swift mailer Authenticate
Posted: Tue May 20, 2008 8:38 am
Code: Select all
//SWIFT MAILER
require_once "lib/Swift.php";
require_once "lib/Swift/Connection/SMTP.php";
// require_once "lib/Swift/Authenticator/LOGIN.php";
$smtp = new Swift_Connection_SMTP("mail.sgp.com");
// $smtp->setUsername("xxx");
// $smtp->setpassword("xxx");
// $smtp =& new Swift_Connection_SMTP("mail.sgp.com");
$swift =& new Swift($smtp);
$message =& new Swift_Message("You're invited to create a Portfolio");
$message->attach(new Swift_Message_Part("You've successfully set up your account at sgp.com!", "text/html"));
if( $swift->send($message, new Swift_Address($pic_username), new Swift_Address("administrator@sgp.com", "sgP")) )
{
$msg = '&msg=A verification mail was sent to your email address. Please follow the instructions to complete the sign up process. Thank you.';
}
else
{
die("We are unable to send you the mail for some technical problem");
}
$swift->disconnect();
i couldnt even send out a basic mail.
i've tried the exact same coding with a free mail server and everything is working perfectly.
however, when i input my personal host mail server, it starts generating problem.
the username and password are correct, but not working in swift.
i dun understand.
please help