[SOLVED] setReply and set returnPath
Moderators: Chris Corbyn, General Moderators
-
brunobraga
- Forum Newbie
- Posts: 6
- Joined: Fri Jun 01, 2007 7:43 pm
[SOLVED] setReply and set returnPath
Hello.
I'm having some trouble setting reply to and setReturnPath.
Im have the following:
$message =& new Swift_Message($topic);
....
$message->setReturnPath("bounces@domain.com");
$message->setReplyTo("reply mail");
$message->attach(new Swift_Message_Part(""));
$message->attach(new Swift_Message_Part($content, "text/html"));
in my MESSAGE HEADER the return path and set replay is the same as the mail sender
What am i doing wrong..
Note: using php4
Best regards
I'm having some trouble setting reply to and setReturnPath.
Im have the following:
$message =& new Swift_Message($topic);
....
$message->setReturnPath("bounces@domain.com");
$message->setReplyTo("reply mail");
$message->attach(new Swift_Message_Part(""));
$message->attach(new Swift_Message_Part($content, "text/html"));
in my MESSAGE HEADER the return path and set replay is the same as the mail sender
What am i doing wrong..
Note: using php4
Best regards
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
-
brunobraga
- Forum Newbie
- Posts: 6
- Joined: Fri Jun 01, 2007 7:43 pm
-
brunobraga
- Forum Newbie
- Posts: 6
- Joined: Fri Jun 01, 2007 7:43 pm
ReturnPath ends up as From:
feyd | Please use
and the result is:
The first from should be realsender@example.com.
I hope you can help me.
Best regards, and thanks again for this excellent tool.
Rodrigo
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hello. Swift is great, but there is a buggy behaviour I need help solving: the address we use as ReturnPath is incorrectly used as From (the one outside the envelope). I guess that's not the indended use of ReturnPath. We were using version 3.2.6, but an upgrade to 3.3.1 still let us with the problem. We use PHP5.2.1, and Sendmail as connection. The code is as follows:Code: Select all
$swift = new Swift(new Swift_Connection_Sendmail());
$swift->attachPlugin(new Swift_Plugin_AntiFlood(200, 10), "anti-flood");
$message = new Swift_Message("Teste");
$message->attach(new Swift_Message_Part("Texto"));
$message->setReturnPath("example@example.com");
$html = file_get_contents("03_envio.htm");
... (build $replacements array)
$swift->attachPlugin(new Swift_Plugin_Decorator($replacements), "decorator");
$objHTML = new Swift_Message_Part($html,"text/html");
$message->attach($objHTML);
$swift->batchSend($message, $recipients, "realsender@example.com");Code: Select all
From example@example.com Wed Oct 3 16:58:43 2007
Return-Path: <example@example.com>
...
From: realsender@example.comI hope you can help me.
Best regards, and thanks again for this excellent tool.
Rodrigo
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Swift doesn't do that, your ISP may be rewriting the headers in the same way Gmail does, or your mail client may simply be showing the Sender address rather than reading the From: header. Those headers are also syntactically incorrect since the From: is missing the colon. It looks more like an adjustment by the mail server to me since it also includes that date. Are you sure there's not a trailing space or two before the word "From"?