Support » Plugin: Email Users » Send group messages via SMTP using SendGrid

  • Resolved ARCangelGIRL

    (@arcangelgirl)


    Hello,

    Because most of the emails sent to groups were going to spam, I started to send them via SMTP, using Sendgrid services. Since “Emails to user” has no problem and are successfully delivered, I’m experiencing the problem, when sending emails to groups. Actually no emails are send, if I select any group.
    Does send to group function is compatible with sending emails via SMTP? If no, if there is a workaround to do it?

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mike Walsh

    (@mpwalsh8)

    All email, regardless of how it is composed (group, user, notification, etc.) all go through the same facility within the plugin. They all use wp_mail() to send email. The difference is how headers are constructed. For a group email all of the recipient addresses are placed in the BCC header where as an email to a single user is placed in the TO header.

    If you send an email using Send to User but select more than one user, the addresses are also placed in the BCC header. My guess is your SMTP plugin doesn’t like or recognize the BCC header that Email Users constructs. There was an issue with the Mandrill (I think) plugin where it wanted all of the addresses in the TO header and then Mandrill took care of sending separate emails to prevent recipients from seeing the addresses of other recipients which is what the BCC header does natively. To support this requirement, I added a filter which could be used to swap the BCC and TO headers.

    There is a complete example of how to use Email Users with Mandrill on the plugin description page (search for Mandrill). Sendgrid may have a similar requirement and if it does, the filter solution could also be employed.

    Thank you for your answer!
    Actually I tried exactly the same code as Mandrill and it worked just fine – I was able to send emails to user groups and multiple users.

    The only thing that I noticed is that, when I send emails to group, when I press “Send email” the page starts loading and keep loading probably as long as all emails will be send. After this I get “Page not found”. Should I keep worrying about this?

    Plugin Author Mike Walsh

    (@mpwalsh8)

    I am not sure why you are getting a page not found error, that sounds odd. If you look at the HTML page source, do you have an incomplete page or is it truly an error?/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Send group messages via SMTP using SendGrid’ is closed to new replies.