Bonjour
j'ai un programme en c# :
...
try
{
SmtpClient client = new SmtpClient();
client.Host = "smtp.wanadoo.fr";
client.Port = 25;
Console.WriteLine("Sending an e-mail message to {0} at {1} by using the SMTP host {2}.",
to.User, to.Host, client.Host);
try
{
client.Send(message);//"s.jacob@oodrive.fr", "s.jacob@oodrive.fr", "subject", "body"
}
catch (System.Net.Mail.SmtpException smtp)
{
Console.WriteLine(smtp.ToString());
smtp.GetBaseException();
}
catch (System.Net.Sockets.SocketException sock)
{
sock.GetBaseException();
}
}
catch(SmtpFailedRecipientsException e){
e.GetBaseException();
}
...
dans ma console j'ai :
System.net.mail.smtp.exception: echec d'envoi du courrier System.net.webexception : impossible de se sonnecter au serveur distant Systeme.net.sockets.socketexception : aucune connexion n'a pu être etablie car l'ordinateur cible l'a expressement refusee 80.12.242.10:25
à Systeme.net.sockets.socket.doconnect<endpoint endpointsnapshot, ..
...
Mon application est developpée sur mon poste je suis en entreprise, nous avons thunderbird qui fonctionne avec smtp.wanadoo.fr
Merci
Partager