problems with sending emails to user
-
hi,
we have a problem to include the custom meta fields to the wp_mail-function in our functions.php! the email ist sending perfectly at the right time with hardcoded emailadresse, but if we want to use the custom_meta_field inside the message, we get no values back!
– – –
so how can we get the meta data of the FORM inside of functions.php?
get_post_meta($post->ID, ?custom_field‘, true); is not working at all!– – –
function send_emails_on_new_event($post)
{
$email = get_post_meta($post->ID, ?email‘, true); // email is our email-field in the front-end-form$emails_hardcoded = “[email protected]”;
$title = wp_strip_all_tags(get_the_title($post->ID));
$message = ?Dear {$title} text….”;wp_mail($emails_hardcoded, “Herbalife Sportler Story: {$title}”, $message);
}thx benjamin
- The topic ‘problems with sending emails to user’ is closed to new replies.