Turn off emails

  • Linda Long
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 years 2 months ago #8250 by Linda Long
Turn off emails was created by Linda Long
Tuan,
Is it possible to turn off emails going out from the component when a donation is made?

My client finds it confusing to get an email from the component and another one from Authorize.net. They prefer to keep the Authorize.net email since it has more information about the donation amount, credit card used, etc so that means I need to try to turn off the email going from the component.

Thanks,
Linda

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
13 years 1 month ago #8276 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Turn off emails
Hi Linda

In this case, you will need to edit the code alitle . Please open the file components/com_jdonation/helper/helper.php, in the function sendMail(), please comment/remove the code sending email to administrator :
Code:
//Send emails to notification emails if ($config->notification_emails == '') $notificationEmails = $fromEmail; else $notificationEmails = $config->notification_emails; $notificationEmails = str_replace(' ', '', $notificationEmails); $emails = explode(',', $notificationEmails); $subject = $config->admin_email_subject ; $body = $config->admin_email_body; $body = str_replace('[DONATION_DETAIL]', $emailContent, $body); foreach ($replaces as $key=>$value) { $key = strtoupper($key) ; $body = str_replace("[$key]", $value, $body) ; } for ($i = 0, $n = count($emails); $i < $n ; $i++) { $email = $emails[$i]; JUtility::sendMail($fromEmail, $fromName, $email, $subject, $body, 1); }

If you are using latest version, the code is from line 204 to line 220, just comment or remove that code and no emails will be sent to administrator !

Hope this help !

Regards,

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Mr. DamDũng Nguyễn Việt