can you please tell me why you are using socketFactory.port and socketFactory.class
I dont have idea about socketFactory.
you can use default port number as 25.
whether it's copy and paste work
It seems like that because you have method send() with some arguments, you are not using that argument.
Instead of that you are hard coded the value.
That's why I asked