skip to Main Content

How do I customize a function in the functions.php of the divi theme?
Specifically, the contact form submit action should send a mail not only to the specified address but also a second address. If this is not the correct place to make this change, where is?

3

Answers


  1. Divi use its own contact form plugin : http://www.elegantthemes.com/gallery/divi/documentation/contact/

    Take a look at the plugins directory, you’ll probably find what you are looking for. There should be a place where it use the wp_mail function https://codex.wordpress.org/Function_Reference/wp_mail or php’s mail function. Just add your second email address in the headers as CC.

    Login or Signup to reply.
  2. If your using the Divi Contact Module, click on the 3 lines (Options button) on the Contact Module.

    It will open up some General Settings.

    In the “Email” field, it will ask you to put an email where you want the emails sent. If you want to add 2 emails for the messages to go to, simply separate the emails with a “,”

    No need to dive into the php file. You can do it all from the General Settings on the Contact Module.

    Login or Signup to reply.
  3. I think what the user needs is to add a Bcc (Blind Carbon Copy).

    In that case you can use the following script in the function.php file:

    function custom_et_contact_page_headers($headers){
        $headers[]='Bcc: [email protected]';
        return $headers;
    }
    
    add_filter('et_contact_page_headers', 'custom_et_contact_page_headers',10,1);
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search