How to set reply-to when using Swiftmailer

Dave picture Dave · Aug 4, 2011 · Viewed 21k times · Source

How can reply-to be set when using Swiftmailer. The docs mentioned the function setReplyTo() but without specific instructions on how to use it.

Any help will be appreciated.

Answer

Lode picture Lode · Oct 6, 2011

I can confirm that the setReplyTo method works the same way as (for example) the setCC method.

$message->setReplyTo(array(
  '[email protected]',
  '[email protected]' => 'Person 2 Name',
  '[email protected]',
  '[email protected]',
  '[email protected]' => 'Person 5 Name'
));