tags:

views:

2247

answers:

3

Hi,

I want to send mail from my yahoomail Id.How to send mail from yahoo mail Id in VB.NET or C#.NET code. Kind help needed.. Advance Thanks.

Sivakumar.P

A: 

The general idea can be found here

For specifics of Yahoo SMTP, log in to your Yahoo account and click on "Account Info", then "POP, SMTP and NNTP server settings"

JeffH
A: 

Here is an article about sending email via gmail. Jus change the server,username and password settings. Alternatively you can check this question which aslo has some code.

Shoban
+1  A: 

Here are some examples of doing a basic html email messages.

http://help.yahoo.com/l/us/yahoo/mail/original/mailplus/pop/pop-14.html

  ' VB

    Dim m As MailMessage = New MailMessage
    m.From = New MailAddress("[email protected]", "Your Name")
    m.To.Add(New MailAddress("[email protected]", "Recipient Name"))
    m.Subject = "Hello"
    ' Specify an HTML message body
    m.Body = "<html><body><h1>My Message</h1><br>Put the body here.</body></html>"
    m.IsBodyHtml = True
    ' Send the message
    Dim client As SmtpClient = New SmtpClient("smtp.mail.yahoo.com")
    client.Send(m)






  // C#

    MailMessage m = new MailMessage();
    m.From = new MailAddress("[email protected]", "Your Name");
    m.To.Add(new MailAddress("[email protected]", "Recipient Name"));
    m.Subject = "Hello";
    // Specify an HTML message body
    m.Body = "<html><body><h1>My Message</h1><br>Put the body here.</body></html>";
    m.IsBodyHtml = true;
    // Send the message
    SmtpClient client = new SmtpClient("smtp.mail.yahoo.com");
    client.Send(m);
Tom Alderman