Support » Plugin: Events Manager » WP Network – local sub site email sender name email

  • Resolved André B.



    we hope for some help with our issue to override wp network global setting of sender and email address

    In class EM_Mailer and setting to wp_mail, the senders name and email comes from

    if ( $emails_ok && get_option('dbem_rsvp_mail_send_method') == 'wp_mail' ){
    			$from = get_option('dbem_mail_sender_address');
    			$headers = get_option('dbem_mail_sender_name') ? 'From: '.get_option('dbem_mail_sender_name').' <'.$from.'>':'From: '.$from;
    			if( get_option('dbem_smtp_html') ){ //create filter to change content type to html in wp_mail
    				add_filter('wp_mail_content_type',create_function('', 'return "text/html";'));
    			$send = wp_mail($receiver, $subject, $body, $headers);
    				global $phpmailer;
    				$this->errors[] = $phpmailer->ErrorInfo;
    			return $send;

    Is it possible without breaking the plugin, to override this with a custom function, in theme´s functions.php – and we can´t use the following:

    add_filter('wp_mail_from', 'new_mail_from');
    add_filter('wp_mail_from_name', 'new_mail_from_name');
    function new_mail_from($old) {
    return '';
    function new_mail_from_name($old) {
    return get_bloginfo('name');

    because this will break functionality in cf7 with reply to address.

    Hope for some help or guidance of any kind.



Viewing 1 replies (of 1 total)
  • Hiya,

    There’s no way to filter that I’m afraid no.

    Instead, you’ll want to look at having some way of making sure that the ‘dbem_mail_sender_address’ option is set to the e-mail address you’d like to use, by triggering update_option()


Viewing 1 replies (of 1 total)
  • The topic ‘WP Network – local sub site email sender name email’ is closed to new replies.