I want to send email in asp.net using my yahoo account
I want to the know the SMTP server name of yahoo and the port number to use .
Like for gmail i know .its "smtp.gmail.com" and port 587

Whats in case of Yahoo...??
In gmail its free to send...Is it that yahoo CHARGES for sending emails...heard somewhere..it a nt sure...
Is it possible to send email using YAHOO...
Help me out?

Try this link. It describes how to send email using yahoo business account.

/* yahoo */
    public bool SendYahooMail(string sToEmail, string sFromEmail, string sHeader, string sMessage,string Password)
    {
        SmtpClient client = new SmtpClient();
        client.DeliveryMethod = SmtpDeliveryMethod.Network;
        client.EnableSsl = true;

        client.Host = "smtp.mail.yahoo.co.in";
        client.Port = 587;

        // setup Smtp authentication

        System.Net.NetworkCredential credentials = new System.Net.NetworkCredential(sFromEmail, Password);
        client.UseDefaultCredentials = false;
        client.Credentials = credentials;

        System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage();
        msg.From = new MailAddress(sFromEmail);
        msg.To.Add(new MailAddress(sToEmail));

        msg.Subject = sHeader;
        msg.IsBodyHtml = true;
        msg.Body = string.Format(sMessage);
        try
        {
            client.Send(msg);
            return true;
        }
        catch (Exception ex)
        {
            return false;            
        }

    }
    /* Gmail*/
    public bool SendGmailMail(string sToEmail, string sFromEmail, string sHeader, string sMessage,string Password)
    {
        SmtpClient client = new SmtpClient();
        client.DeliveryMethod = SmtpDeliveryMethod.Network;
        client.EnableSsl = true;

        client.Host = "smtp.gmail.com";
        client.Port = 587;

        // setup Smtp authentication

        System.Net.NetworkCredential credentials = new System.Net.NetworkCredential(sFromEmail, Password);
        client.UseDefaultCredentials = false;
        client.Credentials = credentials;

        System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage();
        msg.From = new MailAddress(sFromEmail);
        msg.To.Add(new MailAddress(sToEmail));

        msg.Subject = sHeader;
        msg.IsBodyHtml = true;
        msg.Body = string.Format(sMessage);
        try
        {
            client.Send(msg);
            return true;
        }
        catch (Exception ex)
        {
            return false;            
        }

    }
    //
commented: Good answer, shame about the lack of [CODE] tags +1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.