Skip to content
Snippets Groups Projects
Commit 67075ee0 authored by mathieu's avatar mathieu Committed by Mathieu Lutfy
Browse files

#1 SubscriptionController: set the Return-Path to CiviCRM and From newsletter

parent 81529a62
No related branches found
No related tags found
1 merge request!1tpo/web/donate#1 SubscriptionController: set the Return-Path
......@@ -128,7 +128,9 @@ class SubscriptionController extends BaseController {
$redis->expire($key, 3600);
$email = new \PHPMailer();
\PHPMailer::$validator = 'noregex';
$email->setFrom('info@torproject.org', "The Tor Project");
$email->setFrom('newsletter@torproject.org', "The Tor Project");
// Set the Return-Path so that bounces are processed by CiviCRM
$email->Sender = 'civicrm@crm.torproject.org';
$names = array(ArrayExt::fetch($subscriptionInfo, 'firstName', ''), ArrayExt::fetch($subscriptionInfo, 'lastName', ''));
$nameString = implode(' ', $names);
$email->addAddress($subscriptionInfo['email'], $nameString);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment