【问题标题】:Mandrill Reply-to山魈回复
【发布时间】:2014-06-24 17:00:55
【问题描述】:

今天我注册了 Mandrill 帐户以了解它是如何工作的。 This is my PHP code发送简单的电子邮件:

<?php

$apikey = 'API_KEY_HERE';

require_once 'Mandrill.php';
$mandrill = new Mandrill($apikey);

$message = new stdClass();
$message->html = "html message";
//$message->text = "text body";
$message->subject = "email subject";
$message->from_email = "from@email.com";
$message->from_name  = "My App Name";
$message->to = array(array("email" => "recipient@email.com"));
$message->track_opens = true;

$response = $mandrill->messages->send($message);

var_dump($response);
?>

此脚本使用this Bitbucket repo

我想知道如何在脚本中插入回复电子邮件地址变量。变量名是什么?我正在查看docs page,但我被卡住了。

我是 PHP 新手。我真的很感谢你的帮助。提前致谢!

【问题讨论】:

    标签: php mandrill


    【解决方案1】:

    好的。我找到了。

    $message->headers = array('Reply-To' => 'another@email.com');
    

    【讨论】:

      猜你喜欢
      • 2016-11-16
      • 2016-12-30
      • 2015-12-11
      • 1970-01-01
      • 2015-11-17
      • 2013-06-02
      • 2015-03-24
      • 2014-04-17
      • 2015-11-05
      相关资源
      最近更新 更多