ad notification email to unregistered owner
Hi, i´m working on a site with no registration ads, everybody can post an ad but they need to pay it. I created some custom fields in the form, like name and email (and some others). I want to use the name (cp_nombre) and email (cp_email) fields as the 'user_name' and 'user_email' in the ad notification mail. but is not sending the mail, i think its because it does not have any user, i changed some code in theme-emails.php:
// send new ad notification email to admin
function cp_new_ad_email($post_id) {
// get the post values
$the_ad = get_post($post_id);
$category = get_the_category($post_id);
$ad_title = stripslashes($the_ad->post_title);
$ad_cat = stripslashes($category[0]->cat_name);
$ad_author = get_post_meta($post_id, 'cp_nombre', true);<--------------
$ad_slug = stripslashes($the_ad->guid);
//$ad_content = cp_filter(stripslashes($the_ad->post_content));
$adminurl = get_option('siteurl').'/
wp-admin/post.php?action=edit&post='.$post_id;
This is ok (i think) because its showing the custom filed value in the admin mail for new ads:
-----------------
Titulo:Shes Ruf Tuf Whiz
Categoria:Productos y Servicios
Autor:Grinch
-----------------
I have this code for the ad notification email:
// send new ad notification email to ad owner
function cp_owner_new_ad_email($post_id) {
// get the post values
$the_ad = get_post($post_id);
$category = get_the_category($post_id);
$ad_title = stripslashes($the_ad->post_title);
$ad_cat = stripslashes($category[0]->cat_name);
$ad_author = get_post_meta($post_id, 'cp_nombre', true);<------------
$ad_author_email = get_post_meta($post_id, 'cp_email', true);<--------------
$ad_status = stripslashes($the_ad->post_status);
//$ad_content = cp_filter(stripslashes($the_ad->post_content));
But this is not sending any mail.
Any Help????
Thanks