【问题标题】:How to set up headers "h:Reply-To" with Mailgun php API如何使用 Mailgun php API 设置标题“h:Reply-To”
【发布时间】:2016-02-17 06:50:24
【问题描述】:

如何在 Mailgun php API 中设置标题“回复”?

我已使用此代码,但无法设置标题

Mail::send('email.message', $data, function ($message) use ($data) {
            $message->to($data['to_email'], $data['to_name'])
                ->subject($data['subject'])
                ->from($data['from_email'], $data['from_name']);
        });

【问题讨论】:

标签: php api laravel mailgun


【解决方案1】:

就像在你的$message链上添加一个replyTo一样简单

Mail::send('email.message', $data, function($message) use($data)
{
    $message->to($data['to_email'], $data['to_name'])
        ->subject($data['subject'])
        ->from($data['from_email'], $data['from_name'])
        ->replyTo('REPLY.TO.THIS@email.com');
});

如果你想给回复添加一个名字,只需添加另一个带有名字的参数:

->replyTo('REPLY.TO.THIS@email.com', 'Arsen Ibragimov')

【讨论】:

  • 感谢您的回复。是否可以在标题中设置“name ”?
  • 是的,您可以添加另一个参数,例如:->replyTo('REPLY.TO.THIS@email.com', 'Arsen Ibragimov');
  • 我不得不改用->reply_to
猜你喜欢
  • 1970-01-01
  • 2014-12-09
  • 2019-06-14
  • 2014-11-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-04-19
  • 1970-01-01
相关资源
最近更新 更多