HI Team
I am struggling with getting email to send through a private server for my web project. I am getting emails and sending fine through Mail.app.
Desktop or Web setups don’t work either. And many of the suggestions on the forum are pre APIv2
There is one that seems to work ok that I copied fromSMTP email in 2020r2 broken
However that was three years ago and not sure if anything has changed. I have watched most if not all of Paul’s videos and read all the documentation and the forum posts and I can’t find a resolution to it.
This error shows on the mail server when I try and track delivery.
Can you please offer a way to fix the code to see if I can get it to send?
Here is the code:
Dim smtp As New SMTPSecureSocket
smtp.Address = “mail server address”
smtp.Secure = True
smtp.Port = 587
smtp.ConnectionType = SSLSocket.TLSv12
smtp.Username = “uname”
smtp.Password = “pword”
Dim mail As New EmailMessage
mail.FromAddress = “from@”
mail.AddRecipient( “to@”)
mail.Subject = “mail Verification PIN.”
Dim tttt As String
tttt = “Your Email Verification PIN is:”+ Str(123) + “.”
mail.BodyPlainText = tttt
smtp.Messages.Append(mail)
smtp.SendMail()
// SMTP AUTH is required for message submission on port 587
I have a project file that I can supply with the various options I have tried if that would help.
Have you tried goggling the error? It’s got something to do with SSL and “not properly configuring email clients”. But I can’t figure out what that means. Perhaps you need to log into the account before sending an email?
Thanks Richard for the quick reply.
The error is SMTP AUTH is required for message submission on port 587 that shows on the mail server.
The web & Xojo don’t do anything or show any errors.
Does the SMTPSocket support authorisation? If not you may not be able to use it for secure transmission. You may have to use an SSLSocket and handle the entire protocol yourself.
Edit: this is what I do and it includes the authorisation step.
After Richards response, it sent me on a hunt to see what cPanel was doing.
I turned on a Setting for Pop-before-SMTP and it now sends with the code above.
Who would have thought it would be that easy
Thanks for pointing me in the right direction