Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending email
Message
De
08/05/2007 05:48:41
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Sending email
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Divers
Thread ID:
01223300
Message ID:
01223300
Vues:
57
Hi
I am trying to send a email from .NET it seems to work but nothing happens. After several minutes I get the message
“your email message was unable to be sent because your email server rejected the sender”
   public void SendEmail()
        {
        
        MailMessage mail = new MailMessage();
      mail.From = new MailAddress("fromName@btopenworld.com");           
      mail.To.Add("toName@btopenworld.com");             
      mail.Subject = "hi from stuart ";        	
      mail.Body = "This is the main message";           
SmtpClient smtp = new SmtpClient("mail.btinternet.com");
      smtp.Credentials = new NetworkCredential("myUserName@btopenworld.com", "myPassword");
      smtp.Send(mail);
          
        }
The user name and passwords are correct
What am I doing wrong?
TIA
Stuart
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform