We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Gmail issues with Aspose.Network.Mail 4.7.1

Hello, we have been using Aspose.Network.Mail for quite some time, and recently started using it to send email through Gmail. We have found that when using your product, it takes on average 30-40 seconds to send an email. Using the standard System.Net.Mail is almost instantaneous.

We are sending using the same setup that you have shown in your documentation. Can you think of anything that would cause this delay? Is there something in the 4.7.1 release that could be causing this?



Hi Dan,

I tested sending email using Gmail smtp server at my end with both 4.7.1 and 5.0.0 versions. The result was same for both versions, 7 seconds. Does it take 30-40 seconds with simple email (as in the code snippet below) or an email with attachments?

DateTime dtStart = DateTime.Now;
Console.WriteLine(“sending email…” + dtStart.ToString());

// initialize smtp client
SmtpClient client = new SmtpClient(“smtp.gmail.com”, 587, “user”, “pwd”);
client.EnableSsl = true;
client.SecurityMode = SmtpSslSecurityMode.Explicit;

// prepare email message
MailMessage msg = new MailMessage(“user@gmail.com”, “user@gmail.com”, “testing time”, “test”);

// send email
DateTime dtEnd = DateTime.Now;
TimeSpan ts = dtEnd - dtStart;
Console.WriteLine(“Email sent.” + dtEnd.ToString() + “\nTime spent: " + ts.Seconds.ToString() + " seconds.”);