Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Theo

[Solved] Contact form not always sending to Admin for some users - but works for others

Recommended Posts

Hi

I've been battling with this one for days now. And it's one of those 'magical' wtf? ones.
We've just launched our site, and everything looked fine. Until we tested the Contact forms.

Problem:

  • When some users post from the Contact form the mail doesn't land up at admin (or customer service) email box.
  • So they can do 5 test enquiries but only 1 can come through. Sometimes none.
  • However, under emails, the system reported that the mail was sent successfully and there are no errors in the logs or front-end.
  • The system even sends receipts correctly.
  • Other users like myself can do 16 enquiries and have no problems with the mails reaching the customer service mail box.

At first I thought it could be an SMTP issue as we were using PHPMail send, but after changing it to STMP, the problem persisted. Local mail send is also disabled on the server.
I even got our IT guys to check the mailbox and they're not picking up on any issues. Nothing in Spam / Quarantine.

Could it be some sort of relay issue?
Is there a way that I can change the from address to always say info@siteaddress.com - or will this mess up the email logs?

This is an urgent problem as right now we can't be sure that we are receiving all the vital Contact Enquiries...
Sorry that I'm emphasizing urgent here and in the page title, is just I don't know what else to do... I'm at a loss here..

Has any one else experienced this problem before?

@datakick

Edited by Theo

Share this post


Link to post
Share on other sites

With some mails working, email sending is most likely set up correctly.

However, many mail servers and email clients come with all kinds of spam protection, blacklists and whatnot. Accordingly it's a good idea to check logs of the email server to find out whether mails were sent and perhaps discarded.

Share this post


Link to post
Share on other sites

Thanks Traum. But nothing in the mail logs. Some of the mails from these users are coming through though. I'd understand if they were all blocked... 
The thing is that is that as far as I understand it is the actual site email address that's sending these mails and not the user? 
As some of these forms are in a Lightbox (pulling in the Contact form) and it's using Ajax, could it be Ajax that's causing this?
 

I used Nemo's old tutorial on how to do this. 
http://nemops.com/prestashop-ajax-contact-form/#.XYN8VSgzaUl 

But instead of creating the lightbox with 'ajax', I set it to iframe (to increase performance) - could it be this?
All mails from the actual Contact form page appears to be working fine though. And for me and others the Lightboxes are always sending...

This is the code I use to create the form in the Lightbox:

 $.fancybox({
        type: 'iframe',
        preload: true,
        href: getcontactformurl,
        closeEffect: 'fade',
        autoDimensions: false,
        autoSize: false,
        width: '400px',
        height: 'auto',
        async: true,


 

Edited by Theo

Share this post


Link to post
Share on other sites

Ok all sorted now. So this appears to have been a configuration issue on the Site's server in relation to Office 365.
Not a ThirtyBees problem.
Even though the mail configuration was technically correct, we had to add an additional syntax to the SFP record.
As the server is sending the mail on behalf of an email address on Office 365, we had to tell Office that it could trust the server.

Bizarre thing is that technically all mails should've landed up in Office 365's Spam or Quarantine box.
That didn't happen. Most mails were sent / received successfully.
Just some mails went missing when some users did tests and these mails were nowhere to be found. No Spam, nothing in Office 365 error log, etc.
Even though all mails were sent from the Shop's email address on the site... Yeah WTF.

Always fun running into "magical" IT problems - the ones that are random, only breaks when it wants to, defies logic and understanding, difficult to troubleshoot and hard to explain. 
Magic.

If anyone ever experiences this, this is what we had to add on the DNS/Zone SPF TXT record for the Site's server (added in red):
v=spf1 include:spf.protection.outlook.com include:spf.host-h.net -all

 

Edited by Theo

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...