In my module I want to get the site wide email address - the one that is set in the site information admin pages and that is used for all automatically send email messages.
How can I do this?
$site_email = variable_get('site_mail', '');
In Drupal 8:
$site_mail = \Drupal::config('system.site')->get('mail');
Looking into the system module, I found the settings form references the following:
variable_get('site_mail', ini_get('sendmail_from'));
You can get more ideas with this link
variable_get('site_mail', ini_get('sendmail_from'));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With