I have a Aspose.total license. i am trying to send an Email in java using aspose.email. Here is the sample code i am referring to
SmtpClient client = new SmtpClient(“smtp.gmail.com”, 587, “username(my gmail username)”, “password”);
// Set Security options for the server
// Send the Message now
but here is the issue i am facing.
Exception in thread “main” AsposeException: ConnectFailure
—> AsposeException: ConnectFailure
—> class com.aspose.email.system.exceptions.IOException: ConnectFailure —> class com.aspose.email.system.exceptions.SocketException: No connection could be made because the target machine actively refused it.
Can you please tell me how to fix this issue.
My main concern is to send an email with attachment. It will be very helpful if you could send the sample code to send an email with attachment. Hope i will get the fast response.