Paul
Paul

Reputation: 620

Sending emails using Yahoo SMTP

Hi I have built a website and I would like to send & receive emails to and from my existing yahoo account.

Using the following code

        const string smtpHostAddress = "smtp.mail.yahoo.com";
        const string adminEmailAddress = "[email protected]";
        const string adminEmailPassword = "password";

                //FINALLY LETS CREATE SMTP OBJECT TO SEND THE EMAILS TO ADMIN AND THE USER
                var smtp = new SmtpClient
                {
                    Host = smtpHostAddress,
                    Port = 465,
                    UseDefaultCredentials = false,
                    Credentials = new System.Net.NetworkCredential
                        (adminEmailAddress, adminEmailPassword),
                    EnableSsl = true
                };


                //SEND THE EMAILS OUT
                smtp.Send(toUserMailMessage);
                smtp.Send(toAdminMailMessage);

I am able to send the email to the recipient successfully but I never get the message that was sent into my inbox.

The error i receive is System.Net.Mail.SmtpException: Mailbox name not allowed. The server response was: From address not verified - see http://help.yahoo.com/l/us/yahoo/mail/original/manage/sendfrom-07.html

To identify ports etc I have followed the information outlined here http://www.serversmtp.com/en/smtp-yahoo. I have also set teh 'Allow apps that use less secure sign-in' feature in account security to true.

Ive also tried port 587.

Any ideas?

Paul

Upvotes: 2

Views: 9365

Answers (2)

Sunil Yadav
Sunil Yadav

Reputation: 23

Try:

1) To enable the following option from Yahoo 'Account security' Allow apps that use less secure sign-in

Upvotes: 0

Shannon Holsinger
Shannon Holsinger

Reputation: 2341

Cause

Yahoo's mail service is rejecting your Email. The external Internet Protocol (IP) Address of your sending mail server appears to be on a Spamhaus Blacklist used by Yahoo's mail service.

Solution

Request removal of your IP address from Spamhaus's Blacklist service by going to the URL below:

http://www.spamhaus.org/lookup.lasso

Further information can be found at the following Yahoo article:

550 5.7.1 [BL23] Connections not accepted from IP addresses on Spamhaus XBL http://help.yahoo.com/l/us/yahoo/mail/postmaster/errors/550-bl23.html

Upvotes: 1

Related Questions