Envoyer un email en asp.net

Fermé
anibar Messages postés 6 Date d'inscription mercredi 2 mars 2011 Statut Membre Dernière intervention 10 avril 2013 - 10 avril 2013 à 12:24
Bonjour,








je veux envoyer un email en asp.net
voila mon code :

Dim mail As New MailMessage
mail.Subject = "test email"
mail.From = New MailAddress("anibar.ysf@hotmail.fr")
mail.To.Add("omarakly.mouhcine@gmail.ma")
mail.Body = "massage"
Dim smtp As New SmtpClient("mail.agora-technology.com")

smtp.Send(mail)

voila code Web.config
<system.net>
<mailSettings>
<smtp from="anibar.ysf@hotmail.fr">
<network host="192.168.50.250" port="25" userName="username" password="secret" defaultCredentials="true"/>
</smtp>
</mailSettings>
</system.net>
et voila l'erreur

Boîte aux lettres non disponible. La réponse du serveur était