Hello. I would like to send an information-oriented email to about 50 recipient-subscribers, with a 'No-Reply@...' type Reply-To address that is different from the Send address.
I can do this with the Swift_Message 'setReplyTo' method and all is well if I loop through the RecipientList with $swift->send(). On the otherhand, if I use the 'batchSend()' method, it clears the 'Reply-To' header element that I've set. Can anyone share the reason behind clearing 'Reply-To' in batchSend()? If I remove the Reply-To reset in batchSend(), will this lead to problems?
For my size of a RecipientList, does batchSend() have advantages over a regular send() loop?
Thanks for any help ! and thanks Chris for creating and supporting Swiftmailer!
I've probably overlooked something there. Batch send needn't really worry about clearing the headers unless it specifically happens after a failure. I'll modify this code. You are safe to remove the code which is doing this yes In fact, just remove the call to prepareMessageHeaders(). I'll substitute it for a restoreMessageHeaders() in the event of a failure.
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]
I'm having this same trouble. However, I'm not quite sure I understand the reply.
[quote]In fact, just remove the call to prepareMessageHeaders().[/quote]
I'm not calling that method. Here are my details :
Version : 3.2.4-php5
Connection Type : Sendmail
Here's my code. Please understand it is a mess. I was putting ReplyTo's etc all over the place trying to get this to work.
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]