Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Pierre Vivier-Merle
Hi,
La 2ème option est la bonne :-)
sample complet ci-dessous :
Imports System.Web.Mail 'namespace to be imported
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As_ System.EventArgs) Handles Button1.Click Dim mailMessage As New MailMessage() 'creating an instance of the MailMessage class mailMessage.From = "" 'senders email address mailMessage.To = "" 'recipient's email address mailMessage.Cc = "" 'email address of the Cc recipient mailMessage.Bcc = "" 'email address of the Bcc recipient mailMessage.Subject = "Hello" 'subject of the email message mailMessage.BodyFormat = MailFormat.Text 'message text format. Can be text or html mailMessage.Body = "This tutorial is sending email with an ASP.NET app." 'message body mailMessage.Priority = MailPriority.Normal 'email priority. Can be low, normal or high SmtpMail.SmtpServer = "mail.yourserver.com" 'mail server used to send this email. modify this line based on your mail server SmtpMail.Send(mailMessage) 'using the static method "Send" of the SmtpMail class to send the mail Response.Write("Mail sent") 'message stating the mail is sent End Sub
-- Cordialement, Pierre Venez visiter mon blog : http://blogs.developpeur.org/pierre !
"R.elex" a écrit dans le message de news:
J'ai une page qui envoie des Emails avec ce code J'aimerai Envoyer aussi un copie de ce message a une autre adresse
----------------------------------------------- 'Envoie Email Dim maildef AS MailMessage = new MailMessage() maildef.From > ConfigurationSettings.AppSettings("ExpediteurMail") maildef.To = email.Text
Avec maildef.Bcc = ou maildef.Bcc = "" ou maildef.Bcc = ("")
Cela ne marche pas
Merci pour votre aide
R.Elex
Hi,
La 2ème option est la bonne :-)
sample complet ci-dessous :
Imports System.Web.Mail
'namespace to be imported
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As_
System.EventArgs) Handles Button1.Click
Dim mailMessage As New MailMessage()
'creating an instance of the MailMessage class
mailMessage.From = "xyz@mydomain.com"
'senders email address
mailMessage.To = "abc@sendersemail.com"
'recipient's email address
mailMessage.Cc = "carboncopy@sendersemail.com"
'email address of the Cc recipient
mailMessage.Bcc = "blindcarboncopy@sendersemail.com"
'email address of the Bcc recipient
mailMessage.Subject = "Hello"
'subject of the email message
mailMessage.BodyFormat = MailFormat.Text
'message text format. Can be text or html
mailMessage.Body = "This tutorial is sending email with an ASP.NET
app."
'message body
mailMessage.Priority = MailPriority.Normal
'email priority. Can be low, normal or high
SmtpMail.SmtpServer = "mail.yourserver.com"
'mail server used to send this email. modify this line based on your
mail server
SmtpMail.Send(mailMessage)
'using the static method "Send" of the SmtpMail class to send the mail
Response.Write("Mail sent")
'message stating the mail is sent
End Sub
--
Cordialement,
Pierre
Venez visiter mon blog : http://blogs.developpeur.org/pierre !
"R.elex" <r.elex_rene@wanadoo.fr> a écrit dans le message de news:
OvYBhyCeGHA.3900@TK2MSFTNGP05.phx.gbl...
J'ai une page qui envoie des Emails avec ce code
J'aimerai Envoyer aussi un copie de ce message a une autre adresse
-----------------------------------------------
'Envoie Email
Dim maildef AS MailMessage = new MailMessage()
maildef.From > ConfigurationSettings.AppSettings("ExpediteurMail")
maildef.To = email.Text
Avec
maildef.Bcc = nessage@nom.com
ou
maildef.Bcc = "nessage@nom.com"
ou
maildef.Bcc = ("nessage@nom.com")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As_ System.EventArgs) Handles Button1.Click Dim mailMessage As New MailMessage() 'creating an instance of the MailMessage class mailMessage.From = "" 'senders email address mailMessage.To = "" 'recipient's email address mailMessage.Cc = "" 'email address of the Cc recipient mailMessage.Bcc = "" 'email address of the Bcc recipient mailMessage.Subject = "Hello" 'subject of the email message mailMessage.BodyFormat = MailFormat.Text 'message text format. Can be text or html mailMessage.Body = "This tutorial is sending email with an ASP.NET app." 'message body mailMessage.Priority = MailPriority.Normal 'email priority. Can be low, normal or high SmtpMail.SmtpServer = "mail.yourserver.com" 'mail server used to send this email. modify this line based on your mail server SmtpMail.Send(mailMessage) 'using the static method "Send" of the SmtpMail class to send the mail Response.Write("Mail sent") 'message stating the mail is sent End Sub
-- Cordialement, Pierre Venez visiter mon blog : http://blogs.developpeur.org/pierre !
"R.elex" a écrit dans le message de news:
J'ai une page qui envoie des Emails avec ce code J'aimerai Envoyer aussi un copie de ce message a une autre adresse
----------------------------------------------- 'Envoie Email Dim maildef AS MailMessage = new MailMessage() maildef.From > ConfigurationSettings.AppSettings("ExpediteurMail") maildef.To = email.Text
Avec maildef.Bcc = ou maildef.Bcc = "" ou maildef.Bcc = ("")