• Resolved McCage

    (@mccage)


    Hi,
    I use the User Submitted Posts Plugin and it works perfectly but I did not receive notification emails.
    The Postman SMTP Plugin solved that problem for me when I use only 1 notification address. When I give in 2 addresses (client and administrator) no notification emails are received.
    I cannot see if the cause of this is in the Postman or the USP Plugin.
    USP says it is possible to give in multiple addresses divided by a comma.
    I also tried with ;
    Could the problem be in USP or is it really capable to handle multiple addresses?
    Site: http://www.edithdezwart.nl but under construction at the time of writing this support question.

    https://wordpress.org/plugins/user-submitted-posts/

Viewing 15 replies - 16 through 30 (of 34 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Awesome, that information is very useful. If I may ask something else:

    In your article, you say:

    “Tip: Always set the Reply-To header of your Contact Form to be your visitor’s email address, so that you will be able to reply to your visitor regardless of what shows up as the From address:”

    Which basically says “always set reply-to header”. But this seems to contradict what you say elsewhere (from previously in this forum thread):

    “Since your Reply-To header is the same as the from header, there is no need to set it.”

    Is it safe to say that it’s always a good idea to set the Reply-To header?

    In my experience, all the Contact Forms available for WordPress set the visitor’s email address as the From header. With the intention that the email shows up in your inbox “from” the visitor.

    But services like Hotmail/Gmail/Yahoo discourage this behaviour and re-write the From header to be the email address of the account holder. So the visitor’s email address is lost. In this case setting the Reply-To address is a must.

    But this seems to contradict what you say elsewhere (from previously in this forum thread):

    You are absolutely right. And I will clarify that statement to say if the From address is your own email address, there is no need to set it.

    Is it safe to say that it’s always a good idea to set the Reply-To header?

    Yes* πŸ™‚

    *Easy WP SMTP fails if you set a reply-to address. But that’s just their bug and shouldn’t change what you do.

    Plugin Author Jeff Starr

    (@specialk)

    Awesome man, that is a goldmine of useful information.

    I’m now looking into WP’s bundled PHPMailer and may be using that instead of PHP mail(). That said, would you happen to have a recommended magic header recipe for sending email alerts with PHPMailer?

    I want to get it right this time πŸ™‚

    Well as we discovered back in August, you’re already using the wp_mail function (not PHP mail) to delegate e-mail to either WordPress, or a purpose-built plugin like Postman. Why not stick with that?

    Then you don’t have worry about blocked ports, Gmail API, Mandrill API, SendGrid API, OAuth 2.0, all that stuff!

    Plugin Author Jeff Starr

    (@specialk)

    So yeah that makes sense, because wp_mail() is using PHPMailer, correct?

    Also, would the following headers work well with wp_mail():

    X-Mailer = USP
    From = $name <$from>
    Reply-To = $name <$from>
    Content-Type = text/plain, charset..

    ..where:

    $name = get_bloginfo(‘name’)
    $from = get_bloginfo(‘admin_email’)

    Would that be optimal, or can you suggest any improvements? (note this isn’t the actual code, just pseudo-code for brevity)

    So yeah that makes sense, because wp_mail() is using PHPMailer, correct?

    By default ya. There are a bunch of plugins that modify PHPMailer to use SMTP directly: WP Mail SMTP, WP SMTP, Easy WP SMTP, Mail Bank. They all pretty much copy each other.

    Then there are a bunch of plugins that bring their own implementations:

    • Postman: Zend_Mail / Gmail API / Mandrill API / SendGrid API
    • Cimy SWIFT: Swift Mailer
    • wpMandrill: Mandrill API
    • SendGrid: SendGrid API

    Would that be optimal, or can you suggest any improvements?

    No that’s perfect!

    Plugin Author Jeff Starr

    (@specialk)

    Jason, you have been an enormous help with this, not only for USP but for all of my plugins that involve sending of mail. Glad to hear that my proposed header configuration looks good.

    The only question I have left is about using get_bloginfo('admin_email') for the From address. As you know, the WP administrator can specify *any* email address for that setting, so would there be a problem if the email is not from the same domain?

    From my understanding thus far, the From header must match the domain, so what happens if the address specified in get_bloginfo('admin_email') is for some non-domain/other email address (like hotmail, gmail, or other-domain.com)?

    As you know, the WP administrator can specify *any* email address for that setting, so would there be a problem if the email is not from the same domain?

    Yes, it would be a problem if the mail server did not approve of this address as the From address. While it’s good to be aware of it, that’s not your problem. The user should set the address correctly. You can’t be expected to know what the correct address is.

    From my understanding thus far, the From header must match the domain

    No, not at all. The rule is the email must have originated from the SMTP server denoted in the SPF record of the From email’s domain.

    So the domain can be mywidgets.com and the WP admin can be jeff@gmail.com, if an SMTP plugin is installed that sends via smtp.gmail.com

    The WP admin can be jeff@myotherdomain.com, if the SPF record of myotherdomain.com authorizes mywidgets.com to send email.

    And the WP admin can be jeff@mywidgets.com, again, if the SPF record of mywidgets.com authorizes A or MX to send email.

    For example hendriks.ca:

    hendriks.ca.		3599	IN	MX	1 ASPMX.L.GOOGLE.COM.
    hendriks.ca.		3599	IN	TXT	"v=spf1 include:_spf.google.com -all"

    .. is a Google account and authorizes smtp.gmail.com to send e-mail on its behalf.

    wordpress.com:

    wordpress.com.		12628	IN	MX	0 mail.automattic.com.
    wordpress.com.		3542	IN	TXT	"v=spf1 include:_spf.automattic.com ~all"

    .. is an automattic account and authorizes automattic.com to send e-mail on its behalf.

    whitehouse.gov:

    whitehouse.gov.		526	IN	MX	105 mail1.eop.gov.
    whitehouse.gov.		10153	IN	TXT	"v=spf1 +mx ~all"

    .. is an eop.gov account and authorizes it’s localhost to send mail on it’s behalf.

    Plugin Author Jeff Starr

    (@specialk)

    Had to meditate on that for awhile πŸ™‚

    Okay, I understand now that the email must have originated from the SMTP server denoted in the SPF record of the From email’s domain, as you illustrate with the examples provided in your previous comment.

    Now, with that in mind, back to figuring out the best possible solution and/or advice for sending email via USP (and similar plugins). Is it safe to say that, in general, most domains authorize addresses from the same domain to send email? Such that anydomain.tld in general would likely be configured to authorize sending of email from anyuser@anydomain.tld?

    This is just based on my experience with web hosts and domain setups; I’ve never had to mess with the SPF/MX records or anything similar: domain-based email usually just works without further configuration.

    I ask this because I get the occasional user who asks why their email is not received at whatever email service. It would be nice to be able to advise them to try sending from an email address that is of the same domain as their site, as a way of helping them to troubleshoot whether or not the SPF record (From header) is the issue.

    Way out of my depth here, thanks for bearing with me.

    Is it safe to say that, in general, most domains authorize addresses from the same domain to send email? Such that anydomain.tld in general would likely be configured to authorize sending of email from anyuser@anydomain.tld?

    No such a thing doesn’t exist, certainly not at the address level.

    I ask this because I get the occasional user who asks why their email is not received at whatever email service.

    You can send them to my article. WordPress emails are sent but not received

    Plugin Author Jeff Starr

    (@specialk)

    I made a mistake in my question, instead of asking this:

    “Is it safe to say that, in general, most domains authorize addresses from the same domain to send email?”

    I meant to ask this:

    “Is it safe to say that, in general, most web hosts set up their servers to authorize addresses from the same domain to send email?”

    Again, this is based on 15 years of experience working online, never ever have had to set up any SPF/MX records for email ever. For any account across dozens of servers/hosts.

    It seems that they (or something) configures the servers in such a way as to ensure that domain-based email is sent correctly.

    Is this not the case?

    Please excuse my ignorance in such matters, just not an email “pro”. Thanks.

    No they don’t. MX is optional only if there’s an A record. SPF has been around a while, but it’s only recently that using it as part of a Spam score got popular. And DKIM and DMARC are fairly new. It doesn’t matter what happened before; this is the state of email now πŸ™‚

    Plugin Author Jeff Starr

    (@specialk)

    “this is the state of email now”

    As of when? I just opened a new account last month at a popular web host, and domain-based email can be sent with no problems whatsoever. I merely had to pick a username and password, and then BAM the email whatever@domain.tld just works. No messing with any type of records or anything ever. It was all set up automatically.

    So from my perspective, if someone has a WordPress site hosted on a domain, say, whatever.tld, using an email from that same domain, say, whoever@whatever.tld, is a good starting point for troubleshooting email. As stated, this is because most web hosts configure all of the proper/required records automatically, so the From header is most likely to be correct (unless the web host is doing something incorrectly).

    To further the point, contrast the above scenario with that of the user who specifies, say, a hotmail or gmail address. In this case, then yes, most likely the server is not auto-configured to send email from hotmail/gmail, so the From headers will be incorrect as you have suggested.

    I hope this makes sense, but again I’m not an email expert — just trying to determine the best possible strategy for troubleshooting, etc.

    In my opinion you have it backwards.

    Since gmail and hotmail are existing, well-known and reputable domains, all their configuration is correct. But if I buy somedomain.com at godaddy I’m to expect they’re going to set it up correctly for me? Not a chance. πŸ˜‰

    this is because most web hosts configure all of the proper/required records automatically

    I would love to see even one example where this is true πŸ˜€

    No messing with any type of records or anything ever. It was all set up automatically.

    Cum hoc ergo proper hoc. You can not extrapolate from one case, or a few cases where this works, to all cases. Nor have you tried sending using this domain from every server on the Internet to every server on the Internet. The best you can do is follow the rules as we know them. That’s why we have RFCs!

    I understand your frustration, but the reason I even wrote the 20th WordPress SMTP plugin is because the rules keep changing. And I have seen hundreds (I think there are 40 pages of 20 requests on my profile now?) of problems where out of the box, things just don’t work. Sure you might buy a domain, have your host set up the MX, and hit send and off it goes. But in no way does that mean Gmail is going to allow it to find one of its users. If you think that, you don’t realize what a huge (and expensive) problem spam and phishing have become.

    πŸ™‚

    Plugin Author Jeff Starr

    (@specialk)

    Yeah that doesn’t make any sense to me, most likely because I am missing a lot of essential information on the whole “email” topic.

    Is there a book or something you can recommend that explains in detail the process of sending/receiving email (from a technical perspective)? Thanks in advance for any recommendations, would be great to learn how this works from a straightforward and authoritative source.

Viewing 15 replies - 16 through 30 (of 34 total)
  • The topic ‘Multiple addresses’ is closed to new replies.