je veux envoyer un e-mail avec C# j'ai cherché dans le forum et le FAQ de C# et j'ai trouvé le code suivant:
j'obtient le message d'erreur suivant:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 MailMessage myMail = new MailMessage(); myMail.Subject = "!!"; myMail.From = this.textBox1.Text + "@" + this.textBox2.Text; myMail.To = "hassanibi@hotmail.com"; myMail.Body = this.textBox3.Text; myMail.Headers.Add("Disposition-Notification-To", this.textBox1.Text + "@" + this.textBox2.Text); try { SmtpMail.SmtpServer = "smtp.nerim.fr"; SmtpMail.Send(myMail); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK); }
Impossible d'acceder à l'objet "CDO.Message"
quelqu'un sait la source de cet erreur?
et merci pour votre aide.
Partager