Contact Form 7 submission successful but no email

As I mentioned in my previous message, I’m using Google’s free email service in my case. I had a feeling the server was only sending the mail locally, since mail to addresses outside the domain worked, but mail to addresses in the domain were not received via Google’s interface. I logged into the server control panel and deactivated mail on the account and the messages then started getting through. I hope this helps someone. I also tracked down where the wp_mail() resides. It’s in wp-includes/pluggable.php. It basically just uses php-mailer, a tried and true PHP mail script.

Open the file wp-includes/class-phpmailer.php

In the file you should find:

// PROPERTIES FOR SMTP

In my file its on line 166.

Below that you can edit the SMTP information for wordpress, if you are using googleapps you can use the following information for that:

host: ssl://smtp.gmail.com
port: 465
smtpsecure: tls
smtpauth: true
username: your google apps username
password: your google apps password

Just leave the other smtp settings as they are.

Save that file and upload, now any emails being sent via a contact form from your blog should send just fine.

There is a plugin for the SMTP http://www.callum-macdonald.com/code/wp-mail-smtp/ with this and make sure you have reverse DNS setup and it should work.

For cPanel, its probably under Mail->MX Entry->Email Routing

Resolved by using HGK SMTP extension to reconfigure WordPress email to use SMTP instead of the default wp mail() function. http://wordpress.org/plugins/hgk-smtp/

The cPanel fix worked for me too.

1. From cPanel, under Mail, click MX Entry.
(This takes you to the MX Entry Maintenance screen.)

2. Under Email Routing, select the Remote Mail Exchanger option, and then click Change to confirm.
(My original setting had been Automatically Detect Configuration.)

http://wordpress.org/support/topic/plugin-contact-form-7-submission-successful-but-no-email

How to disable local mail delivery on WHM (cPanel) and Plesk

In the event your mail is being hosted on a 3rd party server (i.e. gmail) you will want to disable local mail service to prevent your server from attempting to deliver mail locally. This will prevent any mail originating on your server from being “lost” due to being delivered to the wrong location.

To do this in Plesk 11, click Domains, then “Open in Control Panel.” Now click on the Mail tab at the top of the page. Click change settings, uncheck the box next to “Activate mail service on domain” and click OK. Your server will no longer attempt to deliver mail locally.

If you’re using WHM/cPanel, log into the domain’s cPanel and click MX Entry from the Mail section. Now choose Remote Mail Exchanger in the Email Routing section.

http://www.codero.com/knowledge-base/questions/273/How+to+disable+local+mail+delivery+on+WHM+%28cPanel%29+and+Plesk

  • Facebook
  • TwitThis
  • StumbleUpon
  • Digg
  • del.icio.us

, , , , , , , , , , , , , ,

One Response to “Contact Form 7 submission successful but no email”

  1. search engine optimization on November 12th, 2013 at 4:30 pm

    Of all the options presented, just disabled local mail delivery using the control panel for the domain name.

    Not a solution for sending remote mail from the website script, but solves the problem of lost mail.

    If we wanted to have the remote SMTP server send the mail and not the website/server, then we would probably use one of the wordpress SMTP plugins.