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 Quote Link to comment Share on other sites More sharing options...
Bauer418 Posted February 23, 2008 Share Posted February 23, 2008 Try setting $mail->SMTPAuth = true; Quote Link to comment 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? Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.