• Resolved Beee

    (@beee)


    I’m using the plugin since this weekend. I like it a lot… It gives me quite some insight in my mailing issues…

    I have the same issue as is described here. All my other mails are received but not the emails which are sent out by WordPress/S2.

    I noticed none of these emails have headers. I know your plugin doesn’t take care of this, but would you know a way how to add them ? I have been looking into using wp_mail() but I can’t make the headers work…

    Hope you can help me out or point me in the right direction… I hope you have a bit more experience with it than I have ??

    https://www.ads-software.com/plugins/wp-mail-logging/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi Beee,

    really happy to hear that you like the plugin.
    That really sounds like a problem of WordPress/S2. You could add the missing header if the title is constant. Maybe like this (untested, hack):

    add_filter( 'wp_mail', 'my_wp_mail_filter', 11 );
    function my_wp_mail_filter( $args ) {
    
    	if( empty( $args['subject'] ) || ( 0 != strcmp($args['subject'], 'The Subject of there S2 mails.' ) ) {
    		return $args;
    	}
    
    	$args['headers'] = array("missingheader");
    
    	return $args;
    }

    But I think you should ask them.

    Thread Starter Beee

    (@beee)

    Thanks for the quick reply. I know the issue is not caused by your plugin but I was hoping for some points in the right direction…

    I was able to send correct headers from my own mail function as described here.

    If I can implement that with the WP emails sent out then I’m golden…

    If I can implement that with the WP emails sent out then I’m golden…

    That’s what the filter above does if I understand you right.

    Thread Starter Beee

    (@beee)

    Ok… I’ll run with it….

    Otherwise you have to invesigate the code of S2. Find the difference between the wp_mail calls in there. Maybe they don’t set the headers by mistake.

    Thread Starter Beee

    (@beee)

    I think i’ll just contact s2 support…. Buying the pro has its perks ??

    Please report when you found the cause.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Headers missing’ is closed to new replies.