Avoid sending to Site email address

Created on 11 May 2021, over 3 years ago
Updated 4 February 2023, almost 2 years ago

Problem/Motivation

Notifications are always sent to the Site email address. This floods inbox of an email address that I don't need notified.

Steps to reproduce

Configure Email Id's to whom the notification is to be sent.

Proposed resolution

Loop through email addresses configured and send individual emails rather than BCC

Remaining tasks

n/a

User interface changes

Maybe this can be an option

API changes

n/a

Data model changes

n/a

💬 Support request
Status

Fixed

Version

3.9

Component

Code

Created by

🇺🇸United States drfuzetto

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇷🇴Romania idflorin

    quick and dirty:
    at
    /web/modules/admin_content_notification/src/AdminContentNotificationService.php

    change
    $to = empty($admin_email) ? \Drupal::config('system.site')->get('mail') : 'noreply@noreply.com';
    with
    $to = $admin_email;

  • 🇮🇳India manish.upadhyay

    Hey idflorin,

    You can implement hook_mail_alter to change the email address as per your convenience.

    Thanks,

  • Hey manish.upadhyay,
    can you explain a little bit more where/how to implement hook_mail_alter to change the email address.
    I get the same "Undelivered Mail Returned to Sender" on noreply@noreply.com since I updated to 3.9
    or is the 4.0-Version the solution? I looked at the code of 4.0 but i lokks to me there is no change to the noreply@noreply.com - section.
    Thanks in advance

Production build 0.71.5 2024