Contact Form 7
Using SMTP Breaks Mail(2) (3 posts)

  1. SpenceYoung
    Posted 5 years ago #

    Hi There,

    I'm working on a WordPress site for a small law firm here in Salt Lake City, and because of the way their system is set up, they need to use SMTP, relayed through their web server, to send e-mail messages. I've used the plugin WP Mail SMTP to do this. Essentially what the plugin does is override the default function of wp_mail() to use SMTP instead of the PHP mail() function, and it works great on another WordPress site I've designed.

    However, the law firm would like to use Mail(2) to send a courtesy copy of the e-mail message to the sender. And I've discovered that with the WP Mail SMTP plugin turned on, Mail(2) no longer functions. My only theory for why this might be is that in the code for Contact Form 7, the author directly used the PHP mail() function for sending Mail(2), instead of using wp_mail(). The problem is, I've scoured the code and don't know where I might hope to change mail() to wp_mail().

    Any help you can provide in this regard would be greatly appreciated. Also, if the developer is reading this post, please make this change in future versions. It's quite a hassle, and using wp_mail() is standard procedure for WordPress plugin development. Thanks.

  2. Takayuki Miyoshi
    Plugin Author

    Posted 5 years ago #

    the author directly used the PHP mail() function for sending Mail(2), instead of using wp_mail()


  3. SpenceYoung
    Posted 5 years ago #


    If I'm wrong, I apologize. However, please explain to me why, when the WP-Mail-SMTP plugin is activated, Mail works just fine, but Mail(2) fails. Thanks.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic