Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require './PHPMailer/PHPMailerAutoload.php';
- $mail = new PHPMailer;
- $mail->isSMTP();
- $mail->SMTPDebug = 4;
- $mail->Debugoutput = 'html';
- $mail->Host = "localhost";
- //Set the SMTP port number - likely to be 25, 465 or 587
- $mail->Port = 25;
- $mail->SMTPAuth = true;
- $mail->Username = "donotreply@myservermail";
- $mail->Password = "mypassword";
- $mail->setFrom('donotreply@myservermail', 'Mail test');
- $mail->addReplyTo('myemail@live.com', 'First Last');
- $mail->addAddress('donotreply@myservermail', 'Test mail');
- $mail->Subject = 'PHPMailer SMTP test';
- $mail->msg = 'Hello there this is a test . ';
- $mail->Body = 'This is a plain-text message body';
- if (!$mail->send()) {
- echo "Mailer Error: " . $mail->ErrorInfo;
- } else {
- echo "Message sent!";
- }
- ?>
- Connection: opening to localhost:25, timeout=300, options=array ()
- Connection: opened
- SMTP -> get_lines(): $data was ""
- SMTP -> get_lines(): $str is "220 localhost ESMTP"
- SMTP -> get_lines(): $data is "220 localhost ESMTP"
- SERVER -> CLIENT: 220 localhost ESMTP
- CLIENT -> SERVER: EHLO MY_SERVER_NAME
- SMTP -> get_lines(): $data was ""
- SMTP -> get_lines(): $str is "250-localhost"
- SMTP -> get_lines(): $data is "250-localhost"
- SMTP -> get_lines(): $data was "250-localhost"
- SMTP -> get_lines(): $str is "250-SIZE 20480000"
- SMTP -> get_lines(): $data is "250-localhost250-SIZE 20480000"
- SMTP -> get_lines(): $data was "250-localhost250-SIZE 20480000"
- SMTP -> get_lines(): $str is "250-AUTH LOGIN"
- SMTP -> get_lines(): $data is "250-localhost250-SIZE 20480000250-AUTH LOGIN"
- SMTP -> get_lines(): $data was "250-localhost250-SIZE 20480000250-AUTH LOGIN"
- SMTP -> get_lines(): $str is "250 HELP"
- SMTP -> get_lines(): $data is "250-localhost250-SIZE 20480000250-AUTH LOGIN250 HELP"
- SERVER -> CLIENT: 250-localhost250-SIZE 20480000250-AUTH LOGIN250 HELP
- Auth method requested: UNKNOWN
- Auth methods available on the server: LOGIN
- Auth method selected: LOGIN
- CLIENT -> SERVER: AUTH LOGIN
- SMTP -> get_lines(): $data was ""
- SMTP -> get_lines(): $str is "334 SOME_ENCRYPTED_STRING"
- SMTP -> get_lines(): $data is "334 SOME_ENCRYPTED_STRING"
- SERVER -> CLIENT: 334 SOME_ENCRYPTED_STRING
- CLIENT -> SERVER: SOME_ENCRYPTED_STRING
- SMTP -> get_lines(): $data was ""
- SMTP -> get_lines(): $str is "334 SOME_ENCRYPTED_STRING"
- SMTP -> get_lines(): $data is "334 SOME_ENCRYPTED_STRING"
- SERVER -> CLIENT: 334 SOME_ENCRYPTED_STRING
- CLIENT -> SERVER: SOME_ENCRYPTED_STRING
- SMTP -> get_lines(): $data was ""
- SMTP -> get_lines(): $str is "235 authenticated."
- SMTP -> get_lines(): $data is "235 authenticated."
- SERVER -> CLIENT: 235 authenticated.
- CLIENT -> SERVER: MAIL FROM:<donotreply@MY_SERVER_MAIL>
- SMTP -> get_lines(): $data was ""
- SMTP -> get_lines(): $str is "250 OK"
- SMTP -> get_lines(): $data is "250 OK"
- SERVER -> CLIENT: 250 OK
- CLIENT -> SERVER: RCPT TO:<MY_EMAIL@yahoo.com>
- SMTP -> get_lines(): $data was ""
- SMTP -> get_lines(): $str is "250 OK"
- SMTP -> get_lines(): $data is "250 OK"
- SERVER -> CLIENT: 250 OK
- CLIENT -> SERVER: DATA
- SMTP -> get_lines(): $data was ""
- SMTP -> get_lines(): $str is "354 OK, send."
- SMTP -> get_lines(): $data is "354 OK, send."
- SERVER -> CLIENT: 354 OK, send.
- CLIENT -> SERVER: Date: Thu, 14 May 2015 10:40:00 +0200
- CLIENT -> SERVER: To: MY_EMAIL yahoo <MY_EMAIL@yahoo.com>
- CLIENT -> SERVER: From: MAIL_SERVER test <donotreply@MY_SERVER_MAIL>
- CLIENT -> SERVER: Reply-To: MY_EMAIL Live <MY_EMAIL@live.com>
- CLIENT -> SERVER: Subject: PHPMailer SMTP test
- CLIENT -> SERVER: Message-ID: <SOME_ENCRYPED_STRING@MY_SERVER_NAME>
- CLIENT -> SERVER: X-Priority: 3
- CLIENT -> SERVER: X-Mailer: PHPMailer 5.2.10 (https://github.com/PHPMailer/PHPMailer/)
- CLIENT -> SERVER: MIME-Version: 1.0
- CLIENT -> SERVER: Content-Type: text/plain; charset=iso-8859-1
- CLIENT -> SERVER: Content-Transfer-Encoding: 8bit
- CLIENT -> SERVER:
- CLIENT -> SERVER: This is a plain-text message body
- CLIENT -> SERVER:
- CLIENT -> SERVER: .
- SMTP -> get_lines(): $data was ""
- SMTP -> get_lines(): $str is "250 Queued (0.000 seconds)"
- SMTP -> get_lines(): $data is "250 Queued (0.000 seconds)"
- SERVER -> CLIENT: 250 Queued (0.000 seconds)
- CLIENT -> SERVER: QUIT
- SMTP -> get_lines(): $data was ""
- SMTP -> get_lines(): $str is "221 goodbye"
- SMTP -> get_lines(): $data is "221 goodbye"
- SERVER -> CLIENT: 221 goodbye
- Connection: closed
- Message sent!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement