PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

wp_mail override?

  1. psm9640
    Member

    Hey guys -

    Would there be a way to override the submit action to use PHP's sendmail instead of wp_mail? A hook/filter or something? We're having an issue where the only way we can get any mail to send off the server is to add an ini_set line for sendmail_from. I realize we could add this line to the core WP files but I'm not a huge fan of this if it can be avoided.

    Better option might be if we could get a hold of the form variables on a specifically targeted template page (via form settings), we could process it there and add our init_line to a custom mail() script on that page.

    Thanks in advance for any help!

    Posted 13 years ago on Monday January 10, 2011 | Permalink
  2. Yes, you can do this using the WP Mail SMTP plugin which you can download here:

    http://wordpress.org/extend/plugins/wp-mail-smtp/

    It changes WordPress to use PHP send mail or SMTP to send email notifications depending on how you configure it.

    Since Gravity Forms uses WordPress wp_mail function to send email, if you install and configure this plugin it would then be used to send email notifications.

    Posted 13 years ago on Monday January 10, 2011 | Permalink