Skip to content

Instantly share code, notes, and snippets.

@hostz-frank

hostz-frank/functions.php

Last active Sep 26, 2020
Embed
What would you like to do?
Send mail copy to users of Divi's contact form.
<?php
/**
* Send copy to Divi's contact form sender.
*/
add_filter( 'et_contact_page_headers', 'change_et_contact_page_headers', 10, 3 );
function change_et_contact_page_headers( $headers, $contact_name, $contact_email ) {
$headers[] = 'Cc: ' . $contact_email;
return $headers;
}
@hostz-frank

This comment has been minimized.

Copy link
Owner Author

@hostz-frank hostz-frank commented Dec 17, 2018

Never use this without captcha. Ideal solution for spammers who want to distribute their message through your contact form!

@pawelgagorowski

This comment has been minimized.

Copy link

@pawelgagorowski pawelgagorowski commented Jan 11, 2019

Hello Frank, one question,

any idea why your code may not work together with EASY WP SMTP plugin?

@peterampazzo

This comment has been minimized.

Copy link

@peterampazzo peterampazzo commented Apr 1, 2019

This is great, works well for me! Thanks!

@hostz-frank

This comment has been minimized.

Copy link
Owner Author

@hostz-frank hostz-frank commented May 4, 2019

Another simple solution: in the address field of the recipient, insert a thing like this:
admin@example.com, %%Email%%

@stillewateren

This comment has been minimized.

Copy link

@stillewateren stillewateren commented Aug 22, 2019

@hostz-frank nope, didn't do the trick... too bad, it would be great to have such a simple solution!

@deasecurity

This comment has been minimized.

Copy link

@deasecurity deasecurity commented Jan 16, 2020

Works like a charm: it should be a standard feature of Divi Contact Form!
Thank you very much Frank.

@zensabbah

This comment has been minimized.

Copy link

@zensabbah zensabbah commented Mar 18, 2020

For me it doens't work :(

Works like a charm: it should be a standard feature of Divi Contact Form!
Thank you very much Frank.

For me not :(, I put exactly the same in the recipient field

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment