Page 1 of 1

email is using local smtp server instead of remote smtp

Posted: Sat Dec 22, 2007 11:35 pm
by s.dot
This is how I've configured Swift

Code: Select all

//load the SMTP connection and authenticate
$smtp = new Swift_Connection_SMTP('smtp.1and1.com', 25);
$smtp->setUsername('me@mydomain.com');
$smtp->setpassword('password');

//start up swift with our SMTP connection
$swift = new Swift($smtp);

//build an HTML message
$message = new Swift_Message($subject);
$message->attach(new Swift_Message_Part($emailText));
$message->attach(new Swift_Message_Part($email, 'text/html'));

//send, yo!
$swift->send($message, $emailAddress, $from);
However, when I get a bounceback, the email tells me it was sent from my local host

Code: Select all

--- The header of the original message is following. ---

Received: from [server.ip.add.ress] (host.mydomain.com [server.ip.add.ress])
	by mrelay.perfora.net (node=mrus1) with ESMTP (Nemesis)
	id 0MKpCa-1J6JNI1Tot-0001Yt; Sun, 23 Dec 2007 00:27:45 -0500