PRodgers4284 Posted February 23, 2008 Share Posted February 23, 2008 I am having trouble with phpmailer, im trying to send an email from a yahoo account but everytime run the script it says: Message was not sent.Mailer error: The following From address failed: ********@yahoo.com. I was wondering if anyone has experience of this that could help me out. My script is: <?php require("class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); // telling the class to use SMTP $mail->Host = "smtp.mail.yahoo.com:25"; // SMTP server $mail->Username = '*********; $mail->Password = '*********'; $mail->From = "*********@yahoo.com"; $mail->AddAddress("*********@yahoo.com"); $mail->Subject = "First PHPMailer Message"; $mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer."; $mail->WordWrap = 50; if(!$mail->Send()) { echo 'Message was not sent.'; echo 'Mailer error: ' . $mail->ErrorInfo; } else { echo 'Message has been sent.'; } ?> Thanks Link to comment https://forums.phpfreaks.com/topic/92608-php-mailer-using-yahoo-email-account/ Share on other sites More sharing options...
Bauer418 Posted February 23, 2008 Share Posted February 23, 2008 Try setting $mail->SMTPAuth = true; Link to comment https://forums.phpfreaks.com/topic/92608-php-mailer-using-yahoo-email-account/#findComment-474609 Share on other sites More sharing options...
PRodgers4284 Posted February 23, 2008 Author Share Posted February 23, 2008 Try setting $mail->SMTPAuth = true; Thanks for the reply, appreciate it, i tried what you suggested: I get the following error now: "Message was not sent.Mailer error: SMTP Error: Could not connect to SMTP host. Thanks" Is there any other configuration settings i need to change? Link to comment https://forums.phpfreaks.com/topic/92608-php-mailer-using-yahoo-email-account/#findComment-474619 Share on other sites More sharing options...
Bauer418 Posted February 23, 2008 Share Posted February 23, 2008 Yahoo uses an SSL encrypted SMTP server, don't they? In order words, port 25 isn't correct (you need the SSL SMTP port) and PHPMailer won't be able to do it for you without some modifications. Search google for using PHPMailer on an SSL server. Link to comment https://forums.phpfreaks.com/topic/92608-php-mailer-using-yahoo-email-account/#findComment-474622 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.