Hi,
I am trying to send mail using the SMTP seetings / credentials of Gmail and Aspose.Email in a Windows Application based on Framework 3.5. But when the execution point hits the line "client.Send(mailMsg)" it is taking a very very long time and nothing happens. No mails are sent.
Please let me if it is possible to send mail using Gmail SMTP configuration in Aspose. If yes, please let me know the error in the below code. Thanks.
Dim mailMsg As MailMessage = New MailMessage()
mailMsg.From = "USEREMAIL_OF_GMAIL_ACCOUNT"
mailMsg.To.Add(New MailAddress("XXXXXXXX"))
mailMsg.Subject = "Testing SMTP through Gmail"
mailMsg.Body = "Test Email's body"
Dim client As SmtpClient = New SmtpClient("smtp.gmail.com", 465, "USERNAME_OF_GMAIL_ACCOUNT", "PASSWORD_OF_GMAIL_ACCOUNT")
client.Send(mailMsg)
Regards,
Deivarayan