Hi,
I sometimes send duplicate emails. After using it for 3 year in my Classic asp application we now use it in .Net.
In Classic asp no problem but in the .Net there is this problem.
The strangest thing is it sends sometimes an duplicate email. In the log of our smtp server I can find the duplicate email with different email id's. Then I changed my code and inserted an unique number in the body of the email. When the dupplicate email is send, the unique number is the same. I'm almost sure Mail.dll is producing the duplicate email.
I can't reproduce it, it is random.
Dim rsa As RSACryptoServiceProvider = New PemReader()
.ReadPrivateKeyFromFile("privatekey.key")
Using smtp As New Smtp()
smtp.SSLConfiguration.EnabledSslProtocols
= SslProtocols.Tls12
smtp.Connect("mail.mydomain.com")
smtp.StartTLS()
Dim builder As New MailBuilder()
builder.Text = textversie
builder.Html = html
builder.Subject = subject
builder.From.Add(New MailBox("mailing@mydomain.com"))
builder.[To].Add(New MailBox(emailadres))
builder.DKIMSign(rsa, "key1", "Mydomain.com")
Dim email As IMail = builder.Create()
Dim result As ISendMessageResult = smtp.SendMessage(email)
smtp.Close()
End Using