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 = "myemailaddress@yahoo.co.uk";
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