Results 1 to 2 of 2

Thread: theme-email.php

  1. #1
    Thread Starter
    haykoian's Avatar
    Join Date
    Jun 2012
    Posts
    12
    Thanks
    0
    Thanked 2 Times in 1 Post

    theme-email.php

    I have been trying to modify the theme-email.php, the section where when an inquiry is sent how the ad poster receives it. When I load the modified file to the web site the whole website goes blank when queried. Can some have a look and let me know where Im going wrong?

    PHP Code:
    // ad poster sidebar contact form email
    function cp_contact_ad_owner_email($postID) {

        
    // wp_mail doesn't seem to work with cc or bcc in headers (as of 2.9.2)
        // this is here for adding it later
        // $Cc = 'youremailaddress@domain.com';
        // $Bcc = get_option('admin_email');

        // check to see if ad is legacy or not
        
    if(get_post_meta($postID'email'true))
            
    $mailto get_post_meta($postID'email'true);
        else
            
    $mailto get_the_author_meta('user_email');

        
    $from_name strip_tags($_POST['from_name']);
        
    $from_email strip_tags($_POST['from_email']);
        
    //$mailto = 'testing@appthemes.com'; // USED FOR TESTING
        
    $subject strip_tags($_POST['subject']);
        
    $headerPic '<IMG height=97 src="http://www.e-connect.net.au/wp-content/themes/classipress/images/eheader.png">';
        
    $headers .= "Content-Type: text/html\r\n";
        
    $headers "From: $from_name <$from_email> \r\n";
        
    $headers .= "Reply-To: $from_name <$from_email> \r\n";
        
    // $headers .= "Cc: $Cc \r\n";
        // $headers .= "BCC: $Bcc \r\n";

        // The blogname option is escaped with esc_html on the way into the database in sanitize_option
        // we want to reverse this for the plain text arena of emails
        
    $sitename wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
        
    $siteurl trailingsla****(get_option('home'));
        
    $permalink get_permalink();

        
    $message $headerPic;
        
    $message  sprintf(__('A potential buyer has inquired about your listing: %s''appthemes'), $permalink) . "\r\n\r\n";
        
    $message .= sprintf(__('Ad Reference ID :''appthemes'), $cp_sys_ad_conf_id) . "\r\n\r\n";
        
    $message .= sprintf(__('Category :''appthemes'), $cat) . "\r\n\r\n";
        
    $message .= sprintf(__('Listing Title:''appthemes'), $post_title) . "\r\n\r\n";
        
    $message .= sprintf(__('Description:''appthemes'), $post_content) . "\r\n\r\n";
        
    $message .= sprintf(__('Price:''appthemes'), $cp_price) . "\r\n\r\n";
        
    $message .= sprintf(__('City:''appthemes'), $cp_city) . "\r\n\r\n";
        
    $message .= sprintf(__('State:''appthemes'), $cp_state) . "\r\n\r\n";
        
    // $message  = sprintf(__('From: %s - %s', 'appthemes'), $from_name, $from_email) . "\r\n\r\n";
            
    $fixPostMessage stripslashes($_POST['message']);
        
    $message .= '"' wordwrap(strip_tags($fixPostMessage), 70) . '"' "\r\n\r\n\r\n";
        
    $message .= sprintf(__('Name: %s''appthemes'), $from_name) . "\r\n";
        
    $message .= sprintf(__('E-mail: %s''appthemes'), $from_email) . "\r\n\r\n\r\n\r\n";
        
    $message .= "Phone : ".wordwrap(strip_tags($_POST['phone']), 70) . "\r\n\r\n";
        
    $message .= '-----------------------------------------' "\r\n";
        
    $message .= sprintf(__('Kind regards, %s''appthemes'), $sitename) . "\r\n";
        
    $message .=  $siteurl "\r\n\r\n";

        
    // ok let's send the email
        
    wp_mail($mailto$subject$message$headers);



  2. #2
    dimitris's Avatar
    Join Date
    Oct 2011
    Location
    Earth
    Posts
    20,617
    Thanks
    222
    Thanked 1,873 Times in 1,770 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. collecting email addresses/adding bcc for email enquiries
    By lausha in forum ClassiPress General Discussion
    Replies: 41
    Last Post: July 22nd, 2012, 09:33 PM
  2. Replies: 9
    Last Post: June 26th, 2012, 06:40 AM
  3. [SOLVED] Contact form on ad page - Email now shows site name and admin email as sender?
    By fraservalley in forum Report ClassiPress Bugs
    Replies: 3
    Last Post: July 26th, 2011, 08:31 PM
  4. Email templates and apply online reply-to email address
    By techbroker in forum Report JobRoller Bugs
    Replies: 1
    Last Post: June 18th, 2011, 10:27 AM
  5. [SOLVED] Contact owner email wont use the person email - admin email instead
    By eberdocarmo in forum Report ClassiPress Bugs
    Replies: 4
    Last Post: November 17th, 2010, 07:55 PM