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 "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" );
?>

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.