SMPT

SMPT

Hello, 

How long should the email sent via SMTP protocol take using Zoho? With my testing, it's usually between 10-20 seconds for it to arrive in the recipient email. Here's the test script that I use in Windows Powershell:

  1. $From = "my@email-domain.com"
  2. $To = "send-to@some-mail.com"
  3. $Subject = "This is the subject of the email"
  4. $Body = @"
  5. <html>
  6. <head>
  7.     <h1> testing SMTP speed </h1>
  8. </body>
  9. </html>
  10. "@

  11. $SMTPServer = "smtppro.zoho.eu"
  12. $SMTPPort = 587
  13. $SMTPUsername = "my-username"
  14. $SMTPPassword = "some-password"

  15. $Email = New-Object System.Net.Mail.MailMessage
  16. $Email.From = $From
  17. $Email.To.Add($To)
  18. $Email.Subject = $Subject
  19. $Email.Body = $Body
  20. $Email.IsBodyHtml = $true

  21. $SMTPClient = New-Object System.Net.Mail.SmtpClient($SMTPServer, $SMTPPort)
  22. $SMTPClient.EnableSsl = $true
  23. $SMTPClient.Credentials = New-Object System.Net.NetworkCredential($SMTPUsername, $SMTPPassword)

  24. # Measure the time taken to send the email
  25. $start = Get-Date
  26. $SMTPClient.Send($Email)
  27. $end = Get-Date
  28. $duration = $end - $start
  29. Write-Output "Email sent in $($duration.TotalSeconds) seconds"
  30. Email sent in 10.9296771 seconds  
This is not too bad, but when I use it in my web application, it is a bit too slow from the user's perspective. Is there anything that can be done to speed it up? Maybe some config tweaks? Is this being throttled intentionally to prevent potential spamming? Does that depend on the plan I'm on with Zoho?