0

I am using drupal_mail function to send emails from a website. My requirement is mail which are sent from website should have from address as noreply@website.com and replyto address should be testing@website.com.

To achieve this i followed some below posts:

Post1

Post2

From addres is working fine but Reply-To is not setting for the mails. Correct me if am doing anything wrong. Below is the code:

function module_mail_alter(&$message) { 
  $message['headers']['From'] = $message['headers']['Sender'] = $message['headers']['Return-Path'] = 'noreply@website.com';

  $message['headers']['Reply-To'] = 'testing@website.com';
}
1

Just take a look at DefaultMailSystem and Ensure that the Return-Path is set.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.