I have an error related to smtp parameters delcared in my asp.net smtp code which worked using mailgun smtp parameters but not-working using aws-ses credentials, it seemed difficult.
The error returned says:
Email not sent. The SMTP server require a secure connection or the client was not authenticated. The server respinse was: Authentication required.
when I tested the parameters on a windows smtp test tool diag, the error returned says:
500 – must issue a STARTTLS command first.
I reached out to AWS and they clarified that the issue has nothing to do with the credentials, else, the error would be different.
AWS Recommended this:
I would request you to please check on client configuration why client is not making the connection over SSL with STARTTLS even though you configured enableSsl=”true” on asp.net end.
<system.net>
<mailSettings>
<smtp deliveryMethod="Network" from="admin@******es.com">
<network host="email-smtp.eu-west-1.amazonaws.com" port="587" userName="AK*******" password="eereree&&&&^^^e" enableSsl="true"/>
</smtp>
</mailSettings>
</system.net>
Is there anyway to delcare STARTTLS or TLS in the mailSettings paramter, we have verified already that the server 2008 we ‘re using support tls1.2
Any help will be appreciated.?
Sam
When I contacted aws suppor team, here is there response below:
AWS Support Team’s Response
Thank you for contacting AWS Premium Support. My name is Rishu, I will be assisting you with your case.
From case notes, I understand that you are getting errors while testing SES credentials using Windows SMTP test tool. You want to know the issue for it and way to overcome it. Please correct me if I am wrong.
I would like to inform you that I checked the SMTP conversation logs provided by you. In the logs, I can see error message as ‘530 Must issue a STARTTLS command first’. This error is usually thrown by the client when the TLS/SSL communication is not happening between the client and SES. This isn’t due to the credentials. If credentials were issues, you would’ve received error something like ‘Incorrect credentials’. In order to overcome this issue, I would request you to please check on client configuration why client is not making the connection over SSL with STARTTLS even though you configured enableSsl=”true” on asp.net end. We AWS Support engineers we do not have the expertise in coding and debugging activities [1], so we cannot comment why asp.net is not making the connection over SSL with SES. However while checking the issue, I found out some third party documents which might help you in overcoming the issue and creating a SSL connection between client and SES over STARTTLS. Please refer to the following document for more information on the same:
https://afterlogic.com/mailbee-net/docs/MailBee.SmtpMail.Smtp.StartTls.html
https://www.codeproject.com/Questions/5317024/How-to-resolve-exception-error-in-processing-The-s
https://learn.microsoft.com/en-us/dotnet/api/system.net.mail.smtpclient.enablessl?view=net-8.0
I hope the above information is helpful to you. If you have any queries or doubts regarding any of the above information, please let me know. I will be more than happy to assist you again. Have a great day ahead!
— end of aws support message —–