• Hello,
    First, thank you for your time and help. For some reason, outside users never receive an email including the link to the download after submitting their form. I’ve tested it with my WordPress site email and it works for this just fine, but for any other of my emails (or anyone else’s emails) it doesn’t work. It is not in the spam folder or anywhere else for myself or other users. I’ve tried email only and both email and inline, but the email will not send. If I use both email and inline, I do receive a link on the website, but I’m curious why the email isn’t working, as this is the preferred method of delivering the download link.
    As far as I can tell, both my Contact Form 7 and Download Monitor plugins are working.
    Thank you, again, for your time.
    Allan

    https://wordpress.org/plugins/email-before-download/

Viewing 15 replies - 1 through 15 (of 15 total)
  • hard to say for sure – there are many possible reasons. just to list a few possible reasons or areas to look at:

    Perhaps you can send to site admin because it’s an email address at the same domain name as your website? or is your site email address something external like a gmail account or whatever?

    i assume your wordpress setup is on a shared hosting provider? perhaps your hosting provider doesn’t allow your wordpress to send email externally until you configure something. Maybe your wordpress SMTP setup (or whatever you’re using) isn’t configured properly to send externally? just throwing that out there … might chk with your hosting provider.

    Hmm. Just to be sure —- Email Before Download normally sends 2 emails out. One email goes to the person who filled in the form and put his email address (this email will have the download links and/or attached files). The other email is a notification email, which most people are going to set up to send to the site admin email address. You’re certain that when you fill in the form using the site admin email address that that email address is indeed receiving the email with the links (or both emails more likely), right?

    If you don’t mind editing code, you could go into email-before-download.php and change the @wp_email calls to wp_email (drop the @ sign) so it won’t suppress any error messages. Then turn on WP_DEBUG in wpconfig.php, then try again and go find your error log file & see if it spit out what the problem is.

    My bet is that Allan is sending to a Gmail or Hotmail or Yahoo user, and because his “WordPress site email” has no SPF/DKIM configured, the receiving service is simply dropping the email.

    Yeah, I thought the same thing, because I had remembered reading that Yaho mail (and other services) had changed their DMARC policies to ‘r’ reject last year, meaning you would need spf & dkim. However, that is only the case when you are sending mail from your server or some 3rd party server & you have set the From: of the email to be an @yahoo.com (or other major email provider) address.

    Considering the fact that you can’t change the From: address in Email Before Download without editing the code or installing another plugin for that purpose, I figured Allan might have some other issue. That said, it still seems like it could be the reason somehow, which is why I was querying him for further info on his site admin email, hosting provider, etc.

    Perhaps I should ask him to just make his page public, if possible,& then I can put an email address in there from my own server & watch the logs to see if his system even attempts to connect.

    Thread Starter allanwood18

    (@allanwood18)

    Thank you both for the help and time looking into this. The website is: http://analyswift.com, and the link with the problem download is: http://analyswift.com/downloads/gebt-download-pc-64-bit-version/ where users can download an engineering program called GEBT. The host is hostgator, if that is helpful. To answer dtynan’s other question, I am certain that I receive both emails when I use the site admin email. When others use it, I only receive the email notifying me that the form has been submitted. Thanks, again, for you time.

    Hey Allan,

    Ok, I just ran my first test and I put an email address that goes to my own server (rather than a Yahoo or a Google). I hit submit on your form and the email immediately showed up. The email looks good, it mentions getting an eval license of VABS, mentions the SwiftComp Discussion Group on cdmHUB, etc.

    So it’s working — at least to an email address that doesn’t check for spf, dkim, etc. (which are methods used for trying to determine that mail is not from some spammer or whatever).

    I will try a gmail & yahoo address next…

    Allan, your domain uses Google for it’s MX, but your SPF is completely wrong. Did you copy it from somewhere else? This would cause the problem you’re describing.

    Change your SPF (TXT) record from

    "v=spf1 ip4:184.173.239.119 a mx include:websitewelcome.com ~all"

    to

    v=spf1 include:_spf.google.com ~all

    See https://support.google.com/a/answer/178723?hl=en

    Allan, are using Google Apps to manage that domain?

    Thread Starter allanwood18

    (@allanwood18)

    Thanks, dtynan, for checking it with your server. I’m glad to hear it worked.

    Jason, we use Google Apps for some things like our email and some tools. I don’t know if we use it to manage the domain. I know we use hostgator and dynadot if that is helpful. Perhaps you can tell me how to check this.

    Also, can you please explain what the change to SPF (TXT) does? I apologize, but I am not familiar with this and want to make sure there wouldn’t be any unintended consequences from making this change.

    The SPF record tells the receiver what server is authorized to send email on your domain. I can send an email from allan@analyswift.com as easily as you can. Mine would obviously be ‘forged’ and SPF helps the receiving server figure that out. In this case you may be violating your own sender policy.

    You can read https://support.google.com/a/answer/33786?hl=en&ref_topic=2759192&rd=1 for more details.

    Also, because you are using Google Apps, keep this is mind:

    http://googleonlinesecurity.blogspot.ca/2014/04/new-security-measures-will-affect-older.html

    FYI, my domain, Hendriks.ca uses Google Apps as well.

    I ran a few tests with different emails in the form to see what would work:
    successful to my own server
    successful to a gmail.com account
    successful to an outlook.com account
    failed to a yahoo.com account

    For yahoo, the EBD email w/download links never showed up. For the other providers, things worked as expected. I examined the headers on the ones that worked:

    myserver — found existing SPF record which didn’t apply and decided to be neutral
    gmail.com — found existing SPF record which didn’t apply and decided to be ‘neutral’
    outlook.com — had a msg saying it opened a special secure channel to microsoft from hostgator, found SPF record and decided to ‘pass’

    Also, though they are using Google Apps for their mx record (and presumably their email accounts), the sending of the emails all happened from hostgator. I expected it to be 198.57.151.237 (analyswift.com) that opened the connection to the receiving system, but instead it was always gator3108.hostgator.com (50.87.144.143). So, it looks like Hostgator has mailservers that handle outgoing SMTP. Oddly, you will note that 50.87.144.143 is also the main nameserver for analyswift.com. That’s weird. I’ve never heard of a nameserver also handling sending mail … not sure what that’s about.

    On that same 50.87.144.143, I noticed something else weird. Could be nothing, but, Jason, go over to mxtoolbox.com and do an mx query on Hendriks.ca and note the IP addresses that go with each google mx host in the table. Open another browser tab, go to mxtoolbox & run an mx query for analyswift.com. See how every IP address is the same and they are all 50.87.144.143? Seems a little weird, but who knows, perhaps just a quirk at mxtoolbox.com.

    Anyway, back to your issue. I think you really need to see what Yahoo is failing on, if you can. It should be bouncing your email back .. probably to allanw@gator3108.hostgator.com. That might be showing up in your cpanel on hostgator in some email section somewhere.

    I’d like to know what Yahoo is saying. Perhaps, the issue is just they’ve blacklisted gator3108.hostgator.com. In the past, Yahoo has blacklisted various hostgator systems just like that one. Unfortunately, they have no list or tool to check, so you have to get the bounced email to know. I think you should contact Hostgator support and get them to look at this with you & see if they can track down this email.

    Also, on the SPF record. I agree with Jason that you need to fix it to include your Google Apps, though I’m skeptical that it’s going to fix the problem with mail not going to Yahoo, since you would only be authorizing Google Apps as a sender, but for these wordpress emails, hostgator is sending them. So, I’m guessing you would either need to include the hostgator mailserver system (and your host as well) in your SPF, or you could change it so that you use Google Apps to actually send your mail, rather than hostgator. To do that, you’ll probably want that wp-smtp-whateveritscalled plugin in order to make wordpress deliver to Google Apps (and you can a bunch of stuff).

    I don’t really know which way is better. The whole thing seems a bit weird. Oh, almost forgot, the IP address & domain name in your existing SPF record are default values that are set up for ‘reseller accounts’. The IP address goes with ThePlanet.com (now Softlayer, now IBM) which had/has reseller agreements with HG. The domain name was also somehow controlled by HG.

    I don’t know if it’s ok to remove the old reseller parts of the SPF, or if you need to keep them and also add ‘a’ for your host and also 50.87.144.143 if you want to keep sending using HG. That would make for an SPF record more like:

    v=spf1 a ip4:50.87.144.143 include:_spf.google.com ip4:184.173.239.119 include:websitewelcome.com ~all

    All that said, I think it’s possible that you might be able to get things to work without any changes to SPF or how email is sent. This may not work, but it’s quick to try .. create an actual ‘wordpress’ email account in your Google Apps (or possibly in HostGator cpanel, not sure .. maybe both) That way there is a real account for the “wordpress@analyswift.com” which is the sender used for EBD. This may just cause it to work. Or, it may not help but you might be able to get the bounced email from Yahoo.com this way. Or it might do nothing…

    Perhaps even better would be to install Custom Sender for Email Before Download, make the From Name be “Info” (it won’t let you use spaces) and the From Sender be “info@analyswift.com”. And, of course, make sure you have real ‘info’ email account on HG or GApps or both. Then try Yahoo again and see if it works. (Note that if you change settings in Email Before Download and save them, then it will wipe out the name & from in the Custom Sender For Email Before Download plugin, so you’ll have to put it back in there each time)

    I realize that’s a ridiculous amount of junk to read through & try out. Email is a pain in the ass.

    Wow, that some sleuthing, @dtynan. Good work. It’s not unusual for an A record to also be the SMTP server, that’s what the +a is for in SPF, and RFC 5321 states that if no MX record exists, the A record should be used to deliver email.

    I’ll sum it up for you, @allanwood18. You have a Gmail (Google Apps) account but you’re sending email through a non-Google SMTP server. This is a big no-no. Of course Google will reject your mail. You must send your mail through smtp.gmail.com, with authentication, and you must have an SPF record that tells the world that is what you meant to do.

    Here is an SMTP plugin that will you send your Google Apps mail correctly (disclaimer: I wrote it – I hope you don’t mind the plug, dtynan): https://wordpress.org/plugins/postman-smtp/

    The SPF record change is up to you and your nameserver service (probably your host).

    Thread Starter allanwood18

    (@allanwood18)

    Wow, indeed! Thank you both for the huge amount of effort that went into answering my questions. I very much appreciate your time. I will work on this and get back to you with the results or any questions.

    Jason, no no, I think that’s great, please mention your own plugin. I’m not connected to EBD or really anything in any way, I just felt sorry for all the people out there asking for help on this and, having just gotten it to work using both old & new Download Monitor (ie with enough knowledge to be dangerous, heh), I figured I should try to give back a little… I’m glad you’re here, because I don’t use Google Apps, so I would have been lost there.

    As far as the ‘a’ (+a), yeah I knew that was for the host, that’s why I suggested adding it back in to the SPF string you had listed … but I didn’t know that GApps required or preferred you to send mail using their SMTP. … Yeah, I think you may have misunderstood what I was getting at, or I probably wasn’t too clear, I posted that in the middle of the night. Let me try again…

    The A record for analyswift.com is 198.57.151.237. In the mail headers, I would have expected to see that system connect to my system using SMTP to deliver the mail. However, the system that connected was 50.87.144.143 (gator3108.hostgator.com). That is the nameserver. My point was that I have never seen a nameserver that was also a (presumably shared) mail gateway system. Most people running their own systems have, at some point, made a single physical system running everything from nameservers to database to webserver, etc., but I’ve never heard of a real company that had their nameservers also connecting to systems on the internet to deliver mail. That’s weird — normally you want your nameserver to be quick & not have other poop taking up a bunch of network bandwidth. But, anyway, it was just an observation and one that won’t matter if Allan does he should & switches to GApps for SMTP.

    Ok, I think I beat the topic to death now, so I’ll shutup 🙂 Allan, let us know if you have further questions/issues.

    Here’s another weird thing. If you run dig and use your authoritative nameserver (ns6215.hostgator.com) as the nameserver for dig to query and you get the MX record for analyswift.com, the “ADDITIONAL SECTION” looks pretty weird to me (see below).

    Note that the Google Apps hosts (like ASPMX.L.GOOGLE.com.) are not associated with Google IP addresses, instead they point back to your authoritative nameserver (50.87.144.143 also known as ns6215.hostgator.com).

    I could find nothing in hostgator or google apps that ever suggested it should be that way. I found plenty of dig examples for Google Apps that had the correct IPs associated with the Google hostnames. I was able to find a couple of other Hostgator customers that had similar weird ADDITIONAL SECTIONs, but there wasn’t enough info in them to determine how bad a problem this is (if it is a problem).

    There is some wording in an RFC about how the ADDITIONAL SECTION might be used with delegated nameservers, that I didn’t fully understand, but perhaps it’s due to that and is not an issue. Alternatively, there is a cpanel option to change your MX record from local to remote and perhaps this has something to do with that setting, though that seems unlikely.

    I suspect this is a problem, but I don’t know for sure. I suggest you check with hostgator support (which is hit or miss). It kind of looks like Google Apps setup didn’t get completed properly, but that’s just a guess.

    > dig @ns6215.hostgator.com mx analyswift.com
    
    ; <<>> DiG 9.8.3-P1 <<>> @ns6215.hostgator.com mx analyswift.com
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30318
    ;; flags: qr aa rd; QUERY: 1, ANSWER: 5, AUTHORITY: 2, ADDITIONAL: 7
    ;; WARNING: recursion requested but not available
    
    ;; QUESTION SECTION:
    ;analyswift.com.			IN	MX
    
    ;; ANSWER SECTION:
    analyswift.com.		14400	IN	MX	10 ASPMX2.GOOGLEMAIL.com.
    analyswift.com.		14400	IN	MX	10 ASPMX3.GOOGLEMAIL.com.
    analyswift.com.		14400	IN	MX	1 ASPMX.L.GOOGLE.com.
    analyswift.com.		14400	IN	MX	5 ALT1.ASPMX.L.GOOGLE.com.
    analyswift.com.		14400	IN	MX	5 ALT2.ASPMX.L.GOOGLE.com.
    
    ;; AUTHORITY SECTION:
    analyswift.com.		86400	IN	NS	ns2777.hostgator.com.
    analyswift.com.		86400	IN	NS	ns2778.hostgator.com.
    
    ;; ADDITIONAL SECTION:
    ASPMX3.GOOGLEMAIL.com.	3600	IN	A	50.87.144.143
    ASPMX.L.GOOGLE.com.	3600	IN	A	50.87.144.143
    ALT1.ASPMX.L.GOOGLE.com. 3600	IN	A	50.87.144.143
    ALT2.ASPMX.L.GOOGLE.com. 3600	IN	A	50.87.144.143
    ASPMX2.GOOGLEMAIL.com.	3600	IN	A	50.87.144.143
    ns2777.hostgator.com.	14400	IN	A	50.87.144.143
    ns2778.hostgator.com.	14400	IN	A	198.57.151.223
    
    ;; Query time: 74 msec
    ;; SERVER: 50.87.144.143#53(50.87.144.143)

    dtynan

    (@dtynan)

    allan were you ever able to get this working? did you get it set up to send through google apps?

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Email Sent Upon Successful Form Submission Only Working with My WordPress Email’ is closed to new replies.