I try to send an email using the amazon SES service. My code is taken from their documantation:
public static void SendWithSMTP(string username, string password, string host, int port)
{
using (var client = new System.Net.Mail.SmtpClient(host, port))
{
client.Credentials = new System.Net.NetworkCredential(username, password);
client.EnableSsl = true;
client.Send("from@example.com", "to@example.com", "This is a test subject.", "This is a test email message body.");
}
the problem is that i get the following exception:
The SMTP server requires a secure connection or the client was not authenticated. The server response was: Authentication required
Is there anyone who had the same or similar problem? Any suggestions on this problem?