Viewing 9 replies - 1 through 9 (of 9 total)
  • WP Better Emails is doing some very mailer-specific things. It is not written to work across all mailers.

    This code from wpbe.php looks to see if PHPMailer is sending the email, then injects the email content into the HTML template:

    add_action( 'phpmailer_init',   array( $this, 'send_html' ) );
    [...]
    if ( $this->send_as_html ) {
    	$phpmailer->Body = $this->process_email_html( $phpmailer->Body );
    }

    It also looks to see if WPMandrill is sending the email, then injects the email content into the HTML template:

    add_filter( 'mandrill_payload', array( $this, 'wpmandrill_compatibility' ) );
    [...]
    if ( $this->check_template() ) {
    	$message['html'] = $this->process_email_html( $message['html'] );
    }

    Obviously, Postman is neither PHPMailer nor WPMandrill, so the template code is never run.

    To the author of WP Better Emails, @nlemoine, why didn’t you use the wp_mail filter to modify the mail content? Much cleaner, and a WordPress-approved way to achieve your goal.

    Unfortunately, Postman SMTP (and Cimy Swift, and SendGrid, etc.) and WP Better Emails will be incompatible until the author corrects this issue.

    Cheers!
    Jason

    https://wordpress.org/plugins/postman-smtp/

    Thread Starter uberjuice

    (@uberjuice)

    Thanks Postman,

    Do you have another recommendation on customizing wordpress’s default emails?

    I have this issue as well.

    Is there an update on how this can work with Postman SMTP?

    Here’s a recommendation from another user: https://wordpress.org/support/topic/simple-and-elegant-48?replies=1

    Thread Starter uberjuice

    (@uberjuice)

    Thank you, I will look into this

      @nlemoine any update on this issue?

      Plugin Author Nicolas Lemoine

      (@nlemoine)

      Hi Jason,

      Sorry, your topic is markerd as “to be answered” but I have no spare time right now to update my plugin.

      why didn’t you use the wp_mail filter to modify the mail content? Much cleaner, and a WordPress-approved way to achieve your goal.

      There’s no “much cleaner” or “WordPress-approved” way to do this, just multiple ways. If you have a look at other email templating plugins, they use the same hooks.

      Obviously, Postman is neither PHPMailer nor WPMandrill, so the template code is never run.

      That’s the sin of most SMTP plugins. Each one sends email its own way, often by overrriding wp_mail and not adding WordPress email hooks back in the process (wp_mail_content_type, wp_mail_from, wp_mail_from_name, etc.). Templating plugins provides ways to adapt (as you mentionned for Mandrill), not the other way arround.

      I plan to rewrite soon my plugin from scratch. At that time, I’ll compare the most popular SMTP plugins and try to find the most common way to make this work everywhere. I’ll add Postman to my list.

      Thanks for answering!

      There’s no “much cleaner” or “WordPress-approved” way to do this

      We’ll have to agree to disagree. There are two other less popular templating plugins that both use the WordPress API (i.e the wp_mail filter) and don’t suffer the problem that this thread is about.

      That’s what the API is for.

      Hi,

      Does the plugin now work with Postman Now? I saw another thread in the support forum that says it does but it doesn’t seem to be working on two of my sites.

      I have already tried disabling all plugins and except for these two – no luck. Can anyone confirm?

      WP: 4.4
      WP Better Emails: 0.2.8

      Thanks

    Viewing 9 replies - 1 through 9 (of 9 total)
    • The topic ‘Not working with Postman SMTP’ is closed to new replies.