kiss-o-matic Posted February 28, 2010 Share Posted February 28, 2010 Hey guys I just moved, and I'm now forced to use Yahoo's SMTP service, and I can't get phpmailer to work. My phpMailer code works. I've gone through the steps of verifying my "from" email address at Yahoo (Plus). I've set up Yahoo's SMTP server in Thunderbird and tested it (works). Still no love w/ phpmailer. Here's the code just in case. I've tried "me@sender.com" as well as my main yahoo account which is also not working, which smells fishy to me. I always get the "from failed" error. I can't get the language to load either, but that's another issue. function pmail( $to, $from, $subject, $body, $charset = "iso-8859-1" ) { printf( "atempting to send mail to $to from $from\n" ); $mail = new PHPMailer(); $mail->SetLanguage( "en", "/path/to/phpmailer/language" ); $mail->setCharset( $charset ); $mail->IsSMTP(); $mail->Host = "plus.smtp.mail.yahoo.com:465"; $mail->SMTPAuth = true; $mail->SMTPSecure = "ssl"; $mail->Username = "myusername"; $mail->Password = "mypassword"; $mail->From = $from; $mail->FromName = $from; $mail->AddAddress( $to ); $mail->AddReplyTo( $from ); $mail->WordWrap = 50; $mail->IsHTML( true ); $mail->Subject = $subject; $mail->Body = $body; if( !$mail->Send() ) { print "problem w/ mail: " . $mail->ErrorInfo . " \n<br>"; return false; } return true; <?php pmail( "me@recipient.com", "me@sender.com", "This sucks", "Don't work", "EUC-JP" ); ?> Quote Link to comment Share on other sites More sharing options...
kiss-o-matic Posted February 28, 2010 Author Share Posted February 28, 2010 Err... okay, maybe the "from_failed" isn't the error-code from yahoo. O_o Now to get phpmailer's language file to load. Quote Link to comment Share on other sites More sharing options...
kiss-o-matic Posted February 28, 2010 Author Share Posted February 28, 2010 And we're back to square one: "The following From address failed". Hmm.... 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.