Contact Form 7 failed to send message for only one website.

February 7, 2016 1.5k views
Email WordPress DigitalOcean

I have currently 3 wordpress websites on my droplet. Contact Form 7 is working perfectly fine for 2 websites ( &
but it is not working for website ( I am getting message "Failed to send your message. Please try later or contact the administrator by another method."
I have no idea, why it is not working for just one website. I have all websites in /var/www/ folder and has give same permissions.
I also tried to send email via terminal, which works fine. So postfix is working fine, (that's why other 2 websites working fine as well), but not this one.
Could someone help me out?
I am trying various solutions as per google, but no luck. Please let me know if you want to see any file. Not sure which one to attach now.

P.S - I have recently moved to VPS from shared hosting, so struggling bit.

  • Compare your mail log entries between what worked (from your terminal) versus what didn't work (from wordpress). If your on Ubuntu using postfix, then the log file is usually in /var/log/mail.log

  • Hi, I checked mail.log earlier as well. It is not writing into that. It is writing for the websites it is working like status = sent, but not for this one.
    Yesterday it wrote only once, so saved it. It was status=bounced (unknown user = digitalocean). But I think at that time, permissions on website was not same as others. So I gave same permissions, but now nothing is coming on to mail.log.

  • Check who owns the files and what the webserver runs as.

    When I set up NGINX + PHP7 + Redis I had to add the www-data group into the socket for Redis and then chmod it 775 for it to work. ( I didnt want to change owner).

  • @encodedigital - Are you able to send email locally, like from using Contact Form 7 to (or any of the other subdomains from your droplet)? Examine the raw email header, if it worked, and compare with a mail sent not using Contact Form 7. Trying to eliminate any header corruptions or problems.

  • @gndo - How should I try to send send email locally? Although I did added "" in FROM field in Contact Form 7.
    I just deleted postfix, thought if that is culprit and installed Exim4. But same story again, working for my other 2 websites, but not for this one. Problem is it is not writing to mail.log or now with Exim4 in mainlog.
    Is there any way, I can debug Contact Form 7? I checked my as well, there is nothing specific to my other 2 sites, then how come problem is with only this website.
    I also tried with deactiving my current theme and activating Wordpress sixteen theme, but still same issue. I tried with deactivating all plugins as well, still no luck.

    If anyone knows how to debug Contact Form 7, then please let me know. Not sure what solution will be.

    @olavamjelde - I checked I have correct permissions. Actually same as other 2 working websites, so can't be that issue..

  • @encodedigital - Are you using a mailer plugin? Like Postman or Mailer. Check that to see if it is throttling your email?

  • @gndo - No, I am not using any mailer plugin....I am just searching online as well....Going to try WP mail SMTP plugin...let's see if that helps.

  • ok, finally it is working with WP mail SMTP plugin. I still have no idea, why it is working on my other websites and not on this one...but anyhow atleast I can keep website working.

  • @encodedigital - good, sort of. That means there was a problem invoking 'mail' or 'sendmail' in the default WP php mailer, but no problem directly sending through SMTP with your new plugin.

Be the first one to answer this question.