Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mandrill Reply-to

Tags:

php

mandrill

Today I sign-up Mandrill account to learn how it's work. This is my PHP code to send a simple email:

<?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 = "[email protected]";
$message->from_name  = "My App Name";
$message->to = array(array("email" => "[email protected]"));
$message->track_opens = true;

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

var_dump($response);
?>

This script use this Bitbucket repo.

I wonder how to insert Reply-to email address variable in the script. What is the variable name? I'm looking at the docs page but I get stucked.

I'm new to PHP. I really appreciate your helps. Thanks in advance!

like image 977
Zulhilmi Zainudin Avatar asked May 07 '14 15:05

Zulhilmi Zainudin


1 Answers

Ok. I found it.

$message->headers = array('Reply-To' => '[email protected]');
like image 74
Zulhilmi Zainudin Avatar answered Sep 28 '22 09:09

Zulhilmi Zainudin