Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Improving performance sending emails to Office 365
Message
De
31/03/2017 11:26:54
 
 
À
Tous
Information générale
Forum:
VB.NET
Catégorie:
Optimisation
Titre:
Improving performance sending emails to Office 365
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows Server 2012
Database:
Visual FoxPro
Application:
Web
Divers
Thread ID:
01649603
Message ID:
01649603
Vues:
52
I have this class which sends emails to SMTP servers. When managing our own SMTP servers, either locally or across the Internet, sending emails was a walk in the park, as far as performance goes. I could send dozens of emails within seconds. Now, I have an implementation which goes to Office 365 with SSL authentication. Each email takes 3 seconds to be delivered. I am trying to know if the bottleneck is because there is now SSL, if this is because of the backend, or a mix of both.

The class uses an approach like this:
Dim loEmail As MailMessage = New MailMessage
Dim loNetworkCredential As System.Net.NetworkCredential = Nothing
Dim loSmtpClient As SmtpClient = New SmtpClient

loEmail.Subject = cSubject
loEmail.Body = cBody
loSmtpClient.Host = cSMTP
loSmtpClient.Port = nPort
loSmtpClient.EnableSsl = lEnableSsl

' If we have Ssl
If lEnableSsl Then
   loNetworkCredential = New System.Net.NetworkCredential(cUsername, cPassword)
   loSmtpClient.Credentials = loNetworkCredential
End If
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Répondre
Fil
Voir

Click here to load this message in the networking platform