Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/387953 )
Change subject: Use shell-safe verp when not making CiviMail records ...................................................................... Use shell-safe verp when not making CiviMail records This will give us the option to turn off CiviMail records if TY mail start to lag too far behind. Change-Id: I33997b0dec07fdfabdc029aa89b0d1d962fc4494 --- M sites/all/modules/thank_you/thank_you.module 1 file changed, 12 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/53/387953/1 diff --git a/sites/all/modules/thank_you/thank_you.module b/sites/all/modules/thank_you/thank_you.module index 17bdbb1..883cb68 100644 --- a/sites/all/modules/thank_you/thank_you.module +++ b/sites/all/modules/thank_you/thank_you.module @@ -144,8 +144,15 @@ $form['transaction_id'] = array( '#type' => 'textfield', '#title' => t('Transaction ID'), - '#description' => t('Some kind of key we would use to find your records, example: "CNTCT-1234"'), + '#description' => t('ID to show in the text of the email, for example: "CNTCT-1234"'), '#default_value' => 'TEST-' . mt_rand(), + ); + + $form['contribution_id'] = array( + '#type' => 'textfield', + '#title' => t('Contribution ID'), + '#description' => t('Actual ID of contribution to be thanked, for example: 12345'), + '#default_value' => mt_rand(), ); $form['recurring'] = array( @@ -336,7 +343,8 @@ 'receive_date' => $mailingData['receive_date'], 'recipient_address' => $mailingData['email'], 'recurring' => $is_recurring, - 'transaction_id' => "CNTCT-{$mailingData['contact_id']}", + 'transaction_id' => "CNTCT-{$mailingData['contact_id']}", // shown in the body of the text + 'contribution_id' => $contribution_id, // used for the bounce header 'unsubscribe_link' => build_unsub_link( $contribution_id, $mailingData['email'], $locale ), 'contribution_tags' => wmf_thank_you_get_tag_names($contribution_id), ); @@ -408,6 +416,7 @@ function thank_you_send_mail( $params ) { $require_params = array( 'amount', + 'contribution_id', 'currency', 'from_name', 'from_address', @@ -470,7 +479,7 @@ if ( $civi_queue_record ) { $email['reply_to'] = $civi_queue_record->getVerp(); } else { - $email['reply_to'] = 'bounce-' . str_replace( '@', '=', $email['to_address'] ) . '@donate.wikimedia.org'; + $email['reply_to'] = "ty.{$params['contact_id']}.{$params['contribution_id']}@donate.wikimedia.org"; } try { -- To view, visit https://gerrit.wikimedia.org/r/387953 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33997b0dec07fdfabdc029aa89b0d1d962fc4494 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Ejegg <ej...@ejegg.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits