PHP send yahoo email using smtp

4

How to send yahoo email using smtp server by php.You can send yahoo email using PHPMailer package.Simply pass parameters.
You can Download PHPMailer from here.

If you execute this function in localhost, you must enable “php_openssl” extension of the wamp/xampp.

Final result is like this.

SMTP -> FROM SERVER:220 smtp216.mail.ne1.yahoo.com ESMTP
SMTP -> FROM SERVER: 250-smtp216.mail.ne1.yahoo.com 250-AUTH LOGIN PLAIN XYMCOOKIE 250-PIPELINING 250-SIZE 41697280 250 8BITMIME
SMTP -> FROM SERVER:250 OK , completed
SMTP -> FROM SERVER:250 OK , completed
SMTP -> FROM SERVER:354 Start Mail. End with CRLF.CRLF
SMTP -> FROM SERVER:250 OK , completed

Download PHP send yahoo email using smtp Example (50 KB)

Share.

About Author

Sumith Harshan is the Web Engineer Specializes in Java Script, JQuery, HTML4/5, CSS2/3, PHP, CodeIgniter, CakePHP, J2SE, J2EE, XML, Hacking & Security, Mobile Interface Developing, Magento, Wordpress, Joomla, Drupal,PHPBB,Facebook App Developing and Open cart...etc.

  • mechergui

    if we want just simple replay like “sended” or “error” because i dont want complete message. so what we can do?
    thanks

    • Hello,
      You can simply check if response exist or not as following.

      $response = sendEmail($FromEmail,$Subject,$Message,$FromName,$ToEmail);
      if(!empty($response)) {
      echo ‘Email is sent’;
      } else {
      echo ‘Email sent error’;
      }

      Hope this would be help.

      Thanks

  • omprakash

    This is the mail system at host gateway23.websitewelcome.com.

    I’m sorry to have to inform you that your message could not
    be delivered to one or more recipients. It’s attached below.

    For further assistance, please send mail to postmaster.

    If you do so, please include this problem report. You can
    delete your own text from the attached returned message.

    The mail system

    : delivery temporarily suspended: lost connection
    with mta6.am0.yahoodns.net[63.250.192.45] while sending RCPT TO

    i found this error please help