Cant send email
Posted: Wed Nov 29, 2006 2:17 pm
Yayaya! Ok so I am trying to send an email with the latest php4 version but it wont go. Heres how I try:
here is what it says:
Code: Select all
require('./Swift/Swift.php');
require('./Swift/Swift/Connection/SMTP.php');
$connection = new Swift_Connection_SMTP('smtp.mediapostinc.com');
$mailer = new Swift($connection);
if ($mailer->authenticate('**MY_USER**', '**MY_PASS**'))
{
//If anything goes wrong you can see what happened in the logs
if ($mailer->isConnected()) //Optional
{
//Sends a simple email
$mailer->send(
'andrew@mediapostinc.com',
'kerkface@yaya.com',
'Some Subject',
'Hello Joe it\'s only me!'
);
//Closes cleanly... works without this but it's not as polite.
$mailer->close();
}
else
{
echo 'FAILED';
dump($mailer->errors);
dump($mailer->transactions);
die();
}
}
else
{
echo 'FAILED user/pass';
dump($mailer->errors);
dump($mailer->transactions);
die();
}Can you help me, oh great author?FAILED user/pass
Array
(
[0] => Array
(
[num] => 0
[time] => 0.10932300 1164831287
[message] => MTA Error (Swift was expecting response code 250 but got 0):
)
[1] => Array
(
[num] => 0
[time] => 0.11196000 1164831287
[message] => The MTA doesn't support any of Swift's loaded authentication mechanisms
)
)
Array
(
[0] => Array
(
[command] =>
[time] => 0.10857900 1164831287
[response] =>
)
[1] => Array
(
[command] => HELO 208.106.197.72
[time] => 0.10924100 1164831287
[response] =>
)
)