Says email sent, but don't receive it.
Posted: Fri Sep 12, 2008 1:03 pm
windowsXP, Apache 2.2, MS Exchange SMTP, php 5, SMTP server requires no authorization.
I just loaded the swift library and executed the below test code.
I get email sent confirmation with no exception catches and no errors onscreen, but I don't receive the email.
Also, where is the swift.log saved at? I can't seem to find it on my system.
Can anyone help with this?
thanks
UPDATE:
ms exchanges shows message received with message ID of "12341234134143.swift@localhost"
our server requires qualified domains. Where is the "swift@localhost" coming from? Is this a library setting that I have to change?
<?php
require_once "\program files\php\swiftlib\lib\swift.php";
echo "required swift.php... ";
require_once "\program files\php\swiftlib\lib\swift\Connection\SMTP.php";
echo " required connection\smpt.php... ";
error_reporting(E_ALL); ini_set('display_errors', true);
try {
//Start Swift
$swift = new Swift(new Swift_Connection_SMTP("PCTEMAIL1"));
//Create the message
$message = new Swift_Message("My subject", "My body");
//Now check if Swift actually sends it
$swift->send($message, "webAdmin2@4pct.com", "webAdmin2@4pct.com");
echo "eMail Sent";
} catch (Swift_ConnectionException $e) {
echo "There was a problem communicating with SMTP: " . $e->getMessage();
} catch (Swift_Message_MimeException $e) {
echo "There was an unexpected problem building the email:" . $e->getMessage();
$swift->disconnect();
}
I just loaded the swift library and executed the below test code.
I get email sent confirmation with no exception catches and no errors onscreen, but I don't receive the email.
Also, where is the swift.log saved at? I can't seem to find it on my system.
Can anyone help with this?
thanks
UPDATE:
ms exchanges shows message received with message ID of "12341234134143.swift@localhost"
our server requires qualified domains. Where is the "swift@localhost" coming from? Is this a library setting that I have to change?
<?php
require_once "\program files\php\swiftlib\lib\swift.php";
echo "required swift.php... ";
require_once "\program files\php\swiftlib\lib\swift\Connection\SMTP.php";
echo " required connection\smpt.php... ";
error_reporting(E_ALL); ini_set('display_errors', true);
try {
//Start Swift
$swift = new Swift(new Swift_Connection_SMTP("PCTEMAIL1"));
//Create the message
$message = new Swift_Message("My subject", "My body");
//Now check if Swift actually sends it
$swift->send($message, "webAdmin2@4pct.com", "webAdmin2@4pct.com");
echo "eMail Sent";
} catch (Swift_ConnectionException $e) {
echo "There was a problem communicating with SMTP: " . $e->getMessage();
} catch (Swift_Message_MimeException $e) {
echo "There was an unexpected problem building the email:" . $e->getMessage();
$swift->disconnect();
}