EN tout cas j'ai ajouté un objet au mail.
le message affiché est
:(Citation:
smtpException was unhandled
Version imprimable
EN tout cas j'ai ajouté un objet au mail.
le message affiché est
:(Citation:
smtpException was unhandled
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 using (MailMessage msg = new MailMessage()) { msg.From = new MailAddress(tbexpediteur.Text); msg.To.Add(new MailAddress(tbdestinataire.Text)); msg.Subject = "Bonjour"; msg.Body = "bonjour"; SmtpClient client = new SmtpClient("smtp.mail.yahoo.fr", 465); client.EnableSsl = true; client.Credentials = new NetworkCredential("xxxxx@yahoo.fr", "xxxxxxx"); try { client.Send(msg); } catch (SmtpException ex) { // POINT D'ARRET ICI, TU AURAS LE DETAIL } }
ça marche pas :cry: :cry: :cry: :cry:
bsr
voilà mon code est devenu comme suit:
il n y a pas d'erreurs mais ça ne marche pas :(Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38 private void button1_Click(object sender, EventArgs e) { using (MailMessage msg = new MailMessage()) { msg.From = new MailAddress(tbexpediteur.Text); msg.To.Add(new MailAddress(tbdestinataire.Text)); msg.Subject = objet.Text; msg.Body = "bonjour"; SmtpClient client = new SmtpClient("smtp.mail.yahoo.fr", 465); client.EnableSsl = true; client.Credentials = new NetworkCredential("xxxxx", "xxxx"); try { client.Send(msg); } catch (SmtpException ex) { } } } } }
voilà ce qu'il m'affiche
Citation:
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Users\ACER\Documents\Visual Studio 2008\Projects\mail\mail\bin\Debug\mail.vshost.exe', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\mscorlib.resources\2.0.0.0_fr_b77a5c561934e089\mscorlib.resources.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Data.DataSetExtensions\3.5.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Deployment\2.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 0x1498 has exited with code 0 (0x0).
The thread 0x1718 has exited with code 0 (0x0).
'mail.vshost.exe' (Managed): Loaded 'C:\Users\ACER\Documents\Visual Studio 2008\Projects\mail\mail\bin\Debug\mail.exe', Symbols loaded.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 0x17b4 has exited with code 0 (0x0).
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.resources\2.0.0.0_fr_b77a5c561934e089\System.resources.dll'
A first chance exception of type 'System.Net.Mail.SmtpException' occurred in System.dll
A first chance exception of type 'System.Net.Mail.SmtpException' occurred in System.dll
The thread 0x1008 has exited with code 0 (0x0).
The thread 0x10f0 has exited with code 0 (0x0).
The thread 0x13e4 has exited with code 0 (0x0).
The program '[5836] mail.vshost.exe: Managed' has exited with code 0 (0x0).
Comment faire svp?
:oops::oops::oops::oops::oops:
voilà
et toujours échec d'envoi de courier :(((Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 private void button1_Click(object sender, EventArgs e) { using (MailMessage msg = new MailMessage()) { msg.From = new MailAddress(tbexpediteur.Text); msg.To.Add(new MailAddress(tbdestinataire.Text)); msg.Subject = objet.Text; msg.Body = "bonjour"; SmtpClient client = new SmtpClient("smtp.mail.yahoo.fr", 465); client.EnableSsl = true; client.Credentials = new NetworkCredential("xxxxxxx", "xxxxxx"); try { client.Send(msg); } catch (SmtpException ex) { Console.WriteLine(ex.Message); } } } }
justement rien ne se passe :( sauf que la fenêtre contenant les champs texte et les boutons se bloque pour pendant des secondes puis rien ne se passe.
et puis il ya le long texte que j'ai déjà publié:
Citation:
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Users\ACER\Documents\Visual Studio 2008\Projects\mail\mail\bin\Debug\mail.vshost.exe', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\mscorlib.resources\2.0.0.0_fr_b77a5c561934e089\mscorlib.resources.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Data.DataSetExtensions\3.5.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Deployment\2.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 0x1530 has exited with code 0 (0x0).
The thread 0xff8 has exited with code 0 (0x0).
'mail.vshost.exe' (Managed): Loaded 'C:\Users\ACER\Documents\Visual Studio 2008\Projects\mail\mail\bin\Debug\mail.exe', Symbols loaded.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Échec d'envoi du courrier.
'mail.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.resources\2.0.0.0_fr_b77a5c561934e089\System.resources.dll'
A first chance exception of type 'System.Net.Mail.SmtpException' occurred in System.dll
The thread 0x2cc has exited with code 0 (0x0).
The thread 0x1584 has exited with code 0 (0x0).
The program '[5032] mail.vshost.exe: Managed' has exited with code 0 (0x0).