IMAP, POP3 and SMTP Settings for Yahoo! Mail

Yahoo! IMAP, POP3 and SMTP connections dont require SSL enabled. The following table shows the available settings to establish connections to Yahoo! Mail servers:

Protocol Port Security Mode Server
IMAP 143
993
143
Unsecure
Implicit
Explicit
imap.mail.yahoo.com
POP3 110
995
110
Unsecure
Implicit
Explicit
pop.mail.yahoo.com
SMTP 587
465
Unsecure
Implicit
smtp.mail.yahoo.com

The following example code show you how to connect Yahoo! Mail Servers:

// Create a new instance of the ImapClient class and download a message.
using (ImapClient client = new ImapClient())
{
// Connect to the server.
client.Connect("imap.mail.yahoo.com", 993, SecurityMode.Implicit);
// Login to the server.
client.Authenticate("mytest@yahoo.com", "password");

// Download a message to an instance of the MailMessage class.
MailMessage msg = client.DownloadMailMessage(imapMessageUniqueId);
}

// Create a new instance of the Pop3Client class and download a message.
using (Pop3Client client = new Pop3Client())
{
// Connect to the server.
client.Connect("pop.mail.yahoo.com", 995, SecurityMode.Implicit);
// Login to the server.
client.Authenticate("mytest@yahoo.com", "password");

// Download the message to an instance of the MailMessage class.
MailMessage msg = client.DownloadMailMessage(pop3MessageSequenceNumber);
}

// Create a new instance of the SmtpClient class and send an email.
using (SmtpClient client = new SmtpClient())
{
// Connect to the server.
client.Connect("smtp.mail.yahoo.com", 587);
// Login to the server.
client.Authenticate("mytest@yahoo.com", "password");

// Create a new mail message.
MailMessage msg = new MailMessage();
msg.Subject = "Test Subject";
msg.BodyText = "Content";
msg.From = "from@mydomain.com";
msg.To = "to@somedomain.com";
// And send it.
client.Send(msg);
}