如何在使用Swiftmailer时设置回复

Dav*_*ave 29 php email swiftmailer

如何在使用Swiftmailer时设置回复.文档提到了函数setReplyTo(),但没有关于如何使用它的具体说明.

任何帮助将不胜感激.

Lod*_*ode 48

我可以确认该setReplyTo方法与(例如)setCC方法的工作方式相同.

$message->setReplyTo(array(
  'person1@example.org',
  'person2@otherdomain.org' => 'Person 2 Name',
  'person3@example.org',
  'person4@example.org',
  'person5@example.org' => 'Person 5 Name'
));
Run Code Online (Sandbox Code Playgroud)