Newbie who feels like a dummie
Posted: Wed Jun 25, 2008 12:16 am
Trying to just do a basic mail so I can begin to add this to the things I know how to do --- but I obviously need help can someone help get me on the right track - THANKS
Here is the log and error message
++ Log level changed to 4 ++ Forcing ESMTP mode. HELO is EHLO. ++ Forcing ESMTP mode. HELO is EHLO. ++ Authentication mechanism 'LOGIN' attached. ++ Trying to connect... ++ Trying to connect to SMTP server at 'tls://smtp.gmail.com:465 << 220 mx.google.com ESMTP q18sm11067920pog.13 >> EHLO [127.0.0.1] << 250-mx.google.com at your service, [71.131.35.174] 250-SIZE 28311552 250-8BITMIME 250-AUTH LOGIN PLAIN 250 ENHANCEDSTATUSCODES ++ SMTP extension 'SIZE' reported with attributes [28311552]. ++ SMTP extension '8BITMIME' reported with attributes []. ++ SMTP extension 'AUTH' reported with attributes [LOGIN, PLAIN]. ++ SMTP extension 'ENHANCEDSTATUSCODES' reported with attributes [].
Fatal error: Uncaught exception 'Swift_BadResponseException' with message 'Expected response code(s) [250] but got response [530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://mail.google.com/support/bin/answ ... swer=14257 q18sm11067920pog.13]<h3>Log Information</h3><pre>++ Log level changed to 4 ++ Forcing ESMTP mode. HELO is EHLO. ++ Forcing ESMTP mode. HELO is EHLO. ++ Authentication mechanism 'LOGIN' attached. ++ Trying to connect... ++ Trying to connect to SMTP server at 'tls://smtp.gmail.com:465 << 220 mx.google.com ESMTP q18sm11067920pog.13 >> EHLO [127.0.0.1] << 250-mx.google.com at your service, [71.131.35.174] 250-SIZE 28311552 250-8BITMIME 250-AUTH LOGIN PLAIN 250 ENHANCEDSTATUSCODES ++ SMTP extension 'SIZE' reported with attributes [28311552]. ++ SMTP extension '8BITMIME' reported with attributes []. ++ SMTP extension 'AUTH' reported with attributes [LOGIN, PLAIN]. ++ SMTP extension 'ENHANCEDSTATUSCODES' reported with attributes []. >> MAIL FROM: <nbt9p54@gm in C:\wamp\bin\php\php5.2.5\PEAR\Swift.php on line 250
Code: Select all
<?php
require_once "Swift.php";
require_once "Swift/Connection/SMTP.php";
require_once "Swift/Authenticator/LOGIN.php";
$log =& Swift_LogContainer::getLog();
$log->setLogLevel(4);
$smtp =& new Swift_Connection_SMTP("smtp.gmail.com", 587);
$smtp->setUsername("nbt9p54");
$smtp->setpassword("mypassword");
$smtp->setPort(587);
$log =& Swift_LogContainer::getLog();
$conn =& new Swift_Connection_SMTP("smtp.gmail.com", Swift_Connection_SMTP::PORT_SECURE, Swift_Connection_SMTP::ENC_TLS);
$conn->attachAuthenticator(new Swift_Authenticator_LOGIN());
$log =& Swift_LogContainer::getLog();
$swift =& new Swift($conn);
$log =& Swift_LogContainer::getLog();
$message =& new Swift_Message("My subject", "My body");
echo $log->dump(true);
$sent = $swift->send($message, "nbt9p54@gmail.com", "nbt9p54@gmail.com");
echo "Sent to $sent recipients";
?>++ Log level changed to 4 ++ Forcing ESMTP mode. HELO is EHLO. ++ Forcing ESMTP mode. HELO is EHLO. ++ Authentication mechanism 'LOGIN' attached. ++ Trying to connect... ++ Trying to connect to SMTP server at 'tls://smtp.gmail.com:465 << 220 mx.google.com ESMTP q18sm11067920pog.13 >> EHLO [127.0.0.1] << 250-mx.google.com at your service, [71.131.35.174] 250-SIZE 28311552 250-8BITMIME 250-AUTH LOGIN PLAIN 250 ENHANCEDSTATUSCODES ++ SMTP extension 'SIZE' reported with attributes [28311552]. ++ SMTP extension '8BITMIME' reported with attributes []. ++ SMTP extension 'AUTH' reported with attributes [LOGIN, PLAIN]. ++ SMTP extension 'ENHANCEDSTATUSCODES' reported with attributes [].
Fatal error: Uncaught exception 'Swift_BadResponseException' with message 'Expected response code(s) [250] but got response [530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://mail.google.com/support/bin/answ ... swer=14257 q18sm11067920pog.13]<h3>Log Information</h3><pre>++ Log level changed to 4 ++ Forcing ESMTP mode. HELO is EHLO. ++ Forcing ESMTP mode. HELO is EHLO. ++ Authentication mechanism 'LOGIN' attached. ++ Trying to connect... ++ Trying to connect to SMTP server at 'tls://smtp.gmail.com:465 << 220 mx.google.com ESMTP q18sm11067920pog.13 >> EHLO [127.0.0.1] << 250-mx.google.com at your service, [71.131.35.174] 250-SIZE 28311552 250-8BITMIME 250-AUTH LOGIN PLAIN 250 ENHANCEDSTATUSCODES ++ SMTP extension 'SIZE' reported with attributes [28311552]. ++ SMTP extension '8BITMIME' reported with attributes []. ++ SMTP extension 'AUTH' reported with attributes [LOGIN, PLAIN]. ++ SMTP extension 'ENHANCEDSTATUSCODES' reported with attributes []. >> MAIL FROM: <nbt9p54@gm in C:\wamp\bin\php\php5.2.5\PEAR\Swift.php on line 250