Nie można korzystać z usługi Gmail smtp z usługi Azure Cloud Service

Mój kod do wysyłania wiadomości e-mail przez smtp Gmaila:

SmtpClient client = new SmtpClient("smtp.gmail.com", 587);
client.EnableSsl = true;
client.UseDefaultCredentials = false;
client.Credentials = new NetworkCredential("my_user_name", "my_password");

MailMessage message =
     new MailMessage(new MailAddress("[email protected]"), new MailAddress("[email protected]"));
message.Body = "body";
message.Subject = "subject";
client.Send(message);

Kod działa na moim komputerze lokalnym i podczas publikowania na platformie Azure jako „Witryna sieci Web”.

ALE kiedy publikuję w"Usługa chmury" Mam ten wyjątek:

 System.Net.Mail.SmtpException: The SMTP server requires a secure connection
 or the client was not authenticated. The server response was:
 5.5.1 Authentication Required. Learn more at

Czy jest coś, co różni witrynę sieci Web Windows Azure od „usługi w chmurze”, która może mieć taki efekt?

Dzięki!

questionAnswers(5)

yourAnswerToTheQuestion