Sunday, October 5, 2014

Install PHPMailer 5.2.4 and use smtp gmail




1) PHPMailer download
https://code.google.com/a/apache-extras.org/p/phpmailer/downloads/list
I download PHPMailer_5.2.4.zip and use winrar to unzip and put it in
C:\xampp\htdocs\phpmailertest

2)Configuration php.ini to enable openssl
In C:\xampp\php\php.ini
extension=php_openssl.dll
 If not, you may get the following message:
"SMTP -> ERROR: Failed to connect to server:
 Unable to find the socket transport "ssl" -
 did you forget to enable it when you configured PHP? (1909703479) "

3) Restart Apache

4) Create index.php under  C:\xampp\htdocs\phpmailertest. The red code below is import for using gmail as SMTP.  Change jiansentest and mypassword to your gmail account and password.
<?php
error_reporting(E_ALL);
require("PHPMailer_5.2.4/class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // set mailer to use SMTP
$mail->SMTPDebug  = 2;
$mail->From = "jiansentest@gmail.com";
$mail->FromName = "Jiansen";
$mail->Host = "smtp.gmail.com"; // specif smtp server
$mail->SMTPSecure= "ssl"; // Used instead of TLS when only POP mail is selected
$mail->Port = 465; // Used instead of 587 when only POP mail is selected
$mail->SMTPAuth = true;
$mail->Username = "jiansentest@gmail.com"; // SMTP username
$mail->Password = "mypassword"; // SMTP password

$mail->AddAddress("jiansenreceive@gmail.com", "Jiansen"); //replace myname and mypassword to yours
$mail->AddReplyTo("jiansentest@gmail.com", "Jiansen");
$mail->WordWrap = 50; // set word wrap
//$mail->AddAttachment("c:\\temp\\js-bak.sql"); // add attachments
//$mail->AddAttachment("c:/temp/11-10-00.zip");

$mail->IsHTML(true); // set email format to HTML
$mail->Subject = 'test';
$mail->Body = 'test';

if($mail->Send()) {echo "Send mail successfully";}
else {echo "Send mail fail";}

?>
5) Run
 http://localhost/phpmailertest/
We got
SMTP -> FROM SERVER:220 mx.google.com ESMTP uf6sm10363353pac.16 - gsmtp
SMTP -> FROM SERVER: 250-mx.google.com at your service, [207.81.4.41] 250-SIZE 35882577 250-8BITMIME 250-AUTH LOGIN PLAIN XOAUTH XOAUTH2 PLAIN-CLIENTTOKEN 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-CHUNKING 250 SMTPUTF8
SMTP -> FROM SERVER:250 2.1.0 OK uf6sm10363353pac.16 - gsmtp
SMTP -> FROM SERVER:250 2.1.5 OK uf6sm10363353pac.16 - gsmtp
SMTP -> FROM SERVER:354 Go ahead uf6sm10363353pac.16 - gsmtp
SMTP -> FROM SERVER:250 2.0.0 OK 1412491179 uf6sm10363353pac.16 - gsmtp
SMTP -> FROM SERVER:221 2.0.0 closing connection uf6sm10363353pac.16 - gsmtp
Send mail successfully

Video: Install PHPMailer 5.2.4 and use smtp gmail 

17 comments:

  1. Replies

    1. Hello all
      am looking few years that some guys comes into the market
      they called themselves hacker, carder or spammer they rip the
      peoples with different ways and it’s a badly impact to real hacker
      now situation is that peoples doesn’t believe that real hackers and carder scammer exists.
      Anyone want to make deal with me any type am available but first
      I‘ll show the proof that am real then make a deal like

      Available Services

      ..Wire Bank Transfer all over the world

      ..Western Union Transfer all over the world

      ..Credit Cards (USA, UK, AUS, CAN, NZ)

      ..School Grade upgrade / remove Records

      ..Spamming Tool

      ..keyloggers / rats

      ..Social Media recovery

      .. Teaching Hacking / spamming / carding (1/2 hours course)

      discount for re-seller

      Contact: 24/7

      fixitrogers@gmail.com

      Delete
    2. Jiansen Lu'S Computing Blog: Install Phpmailer 5.2.4 And Use Smtp Gmail >>>>> Download Now

      >>>>> Download Full

      Jiansen Lu'S Computing Blog: Install Phpmailer 5.2.4 And Use Smtp Gmail >>>>> Download LINK

      >>>>> Download Now

      Jiansen Lu'S Computing Blog: Install Phpmailer 5.2.4 And Use Smtp Gmail >>>>> Download Full

      >>>>> Download LINK OZ

      Delete

  2. Fatal error: Uncaught Error: Class 'SMTP' not found in C:\xampp\htdocs\mail\PHPMailer-master\class.phpmailer.php:1466 Stack trace: #0 C:\xampp\htdocs\mail\PHPMailer-master\class.phpmailer.php(1549): PHPMailer->getSMTPInstance() #1 C:\xampp\htdocs\mail\PHPMailer-master\class.phpmailer.php(1486): PHPMailer->smtpConnect(Array) #2 C:\xampp\htdocs\mail\PHPMailer-master\class.phpmailer.php(1323): PHPMailer->smtpSend('Date: Tue, 28 J...', 'test\n') #3 C:\xampp\htdocs\mail\PHPMailer-master\class.phpmailer.php(1203): PHPMailer->postSend() #4 C:\xampp\htdocs\mail\PHPMailer-master\email.php(25): PHPMailer->send() #5 {main} thrown in C:\xampp\htdocs\mail\PHPMailer-master\class.phpmailer.php on line 1466



    always saying like this

    ReplyDelete
    Replies
    1. try this'

      require("PHPMailerAutoload.php");//replace 'class.phpmailer.php'

      Delete
  3. plz tell how i solve that problrm

    ReplyDelete
  4. SMTP -> ERROR: Failed to connect to server: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (61532184)
    The following From address failed: maaustria16@gmail.com : Called Mail() without being connected Send mail fail

    ReplyDelete
  5. Installing PHPmailer on a server is pretty easy. If you have composer available, you can easily install it using a single composer command. Otherwise you will have extract the files and deploy it in the directory manually.
    Source: how to use phpmailer

    ReplyDelete
  6. no error is showing but mail is not going

    ReplyDelete
  7. how to remove
    SMTP -> FROM SERVER:220 mx.google.com ESMTP uf6sm10363353pac.16 - gsmtp
    SMTP -> FROM SERVER: 250-mx.google.com at your service, [207.81.4.41] 250-SIZE 35882577 250-8BITMIME 250-AUTH LOGIN PLAIN XOAUTH XOAUTH2 PLAIN-CLIENTTOKEN 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-CHUNKING 250 SMTPUTF8
    SMTP -> FROM SERVER:250 2.1.0 OK uf6sm10363353pac.16 - gsmtp
    SMTP -> FROM SERVER:250 2.1.5 OK uf6sm10363353pac.16 - gsmtp
    SMTP -> FROM SERVER:354 Go ahead uf6sm10363353pac.16 - gsmtp
    SMTP -> FROM SERVER:250 2.0.0 OK 1412491179 uf6sm10363353pac.16 - gsmtp
    SMTP -> FROM SERVER:221 2.0.0 closing connection uf6sm10363353pac.16 - gsmtp

    ReplyDelete
    Replies
    1. Replace 2 with 0 where it says:
      $mail->SMTPDebug = 2;

      as of

      $mail->SMTPDebug = 0;

      Delete
  8. Hi Clients!

    We have the fresh and valid USA ssn leads and dead fullz
    99% connectivity with quality
    *If you have any trust issue before any deal you may get few to test
    *Every leads are well checked and available 24 hours
    *Fully cooperate with clients

    *Format of Fullz/leads/profiles
    °First & last Name
    °SSN
    °DOB
    °(DRIVING LICENSE NUMBER)
    °ADDRESS
    (ZIP CODE,STATE,CITY)
    °PHONE NUMBER
    °EMAIL ADDRESS
    °REFERENCE DETAILS
    °BANK ACCOUNT DETAILS

    ****Contact Me****
    *ICQ :748957107

    *Gmail :taimoorh944@gmail.com

    Cost for lead cost $2 for each
    Price can be negotiable if order in bulk

    *Contact soon!
    *I hope a long term deal
    *Thank You

    ReplyDelete
  9. Jiansen Lu'S Computing Blog: Install Phpmailer 5.2.4 And Use Smtp Gmail >>>>> Download Now

    >>>>> Download Full

    Jiansen Lu'S Computing Blog: Install Phpmailer 5.2.4 And Use Smtp Gmail >>>>> Download LINK

    >>>>> Download Now

    Jiansen Lu'S Computing Blog: Install Phpmailer 5.2.4 And Use Smtp Gmail >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete