Jump to content

phpmailer & Yahoo Plus


kiss-o-matic

Recommended Posts

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 "[email protected]" 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( "[email protected]", "[email protected]", "This sucks", "Don't work", "EUC-JP" );
?>

 

Link to comment
https://forums.phpfreaks.com/topic/193615-phpmailer-yahoo-plus/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.