Page 1 of 3 123 LastLast
Results 1 to 10 of 24
Like Tree3Likes

Thread: How to send a copy of email to admin from contact poster form

  1. #1
    Thread Starter
    manishkhullar's Avatar
    Join Date
    Nov 2012
    Location
    India
    Posts
    893
    Thanks
    19
    Thanked 15 Times in 14 Posts

    How to send a copy of email to admin from contact poster form

    I had done this earlier also by adding Bcc:abc@dfdf.jjj to $header in some email sending file.
    But after the major update of CP sending mail function has changed a lot.

    What I need is - When someone sends a query to the ad poster from the sidebar, in contact poster tab - a copy of email to be sent to the admin.

    What I have tried is this -

    In emails.php there is a function cp_contact_ad_owner_email( $post_id )
    I added bcc to the last lines of the function and passed in appthemes_send_email()

    PHP Code:
    $email = array( 'to' => $author_email'subject' => $subject'message' => $message'from' => $from_email'from_name' => $from_name );
        
    $email apply_filters'cp_email_user_ad_contact'$email$post_id );

        
    APP_Mail_From::apply_once( array( 'email' => $email['from'], 'name' => $email['from_name'], 'reply' => true ) );
        
    $Bcc "abc@gmail.com";  // added by Manish
        
    appthemes_send_email$email['to'], $email['subject'], $email['message'], $Bcc );

        return 
    $errors
    then I searched for appthemes_send_email() function and found it in classipress->framework-> kernel ->functions.php
    In that function I added

    PHP Code:
    function appthemes_send_email$address$subject$content$Bcc 
    and
    PHP Code:
    $headers = array(
            
    'from' => sprintf'From: %1$s <%2$s>'$blogname"wordpress@$domain),
            
    'mime' => 'MIME-Version: 1.0',
            
    'type' => 'Content-Type: text/html; charset="' get_bloginfo'charset' ) . '"',
            
    'reply_to' => "Reply-To: noreply@$domain",
            
    'bcc' => "BCC: $Bcc \r\n"// added by Manish
        
    ); 
    But it doesn't seem to work.
    Any help please
    A perfect place to outsource your SEO requirements. Check SEO prices in Australia.

  2. #2
    Moderator ovidiubica's Avatar
    Join Date
    Mar 2011
    Posts
    5,768
    Thanks
    242
    Thanked 1,068 Times in 1,008 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  3. #3
    Thread Starter
    manishkhullar's Avatar
    Join Date
    Nov 2012
    Location
    India
    Posts
    893
    Thanks
    19
    Thanked 15 Times in 14 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    A perfect place to outsource your SEO requirements. Check SEO prices in Australia.

  4. #4
    Thread Starter
    manishkhullar's Avatar
    Join Date
    Nov 2012
    Location
    India
    Posts
    893
    Thanks
    19
    Thanked 15 Times in 14 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    A perfect place to outsource your SEO requirements. Check SEO prices in Australia.

  5. #5
    talent's Avatar
    Join Date
    Jul 2011
    Location
    London UK
    Posts
    3,499
    Thanks
    75
    Thanked 556 Times in 504 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    $function ('CUSTOMIZATION'); } else { .DESIGN { display: awesome; }
    If you require any additional functionality or design customization, just ask. Afterall... anything is possible! However, I may not know how to implement your particular request, but if you don't ask, you don't get

    If you build it, they will come...


  6. #6
    Thread Starter
    manishkhullar's Avatar
    Join Date
    Nov 2012
    Location
    India
    Posts
    893
    Thanks
    19
    Thanked 15 Times in 14 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    A perfect place to outsource your SEO requirements. Check SEO prices in Australia.

  7. #7
    talent's Avatar
    Join Date
    Jul 2011
    Location
    London UK
    Posts
    3,499
    Thanks
    75
    Thanked 556 Times in 504 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    $function ('CUSTOMIZATION'); } else { .DESIGN { display: awesome; }
    If you require any additional functionality or design customization, just ask. Afterall... anything is possible! However, I may not know how to implement your particular request, but if you don't ask, you don't get

    If you build it, they will come...


  8. #8
    Thread Starter
    manishkhullar's Avatar
    Join Date
    Nov 2012
    Location
    India
    Posts
    893
    Thanks
    19
    Thanked 15 Times in 14 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    ovidiubica likes this.
    A perfect place to outsource your SEO requirements. Check SEO prices in Australia.

  9. The Following 2 Users Say Thank You to manishkhullar For This Useful Post:

    andreuerj (February 18th, 2018), frame34 (September 3rd, 2020)

  10. #9
    Veteran andreuerj's Avatar
    Join Date
    Jan 2012
    Location
    Brazil
    Posts
    1,666
    Thanks
    586
    Thanked 18 Times in 17 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  11. #10
    Moderator ovidiubica's Avatar
    Join Date
    Mar 2011
    Posts
    5,768
    Thanks
    242
    Thanked 1,068 Times in 1,008 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  12. The Following User Says Thank You to ovidiubica For This Useful Post:

    Fanatic (September 10th, 2020)

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: December 5th, 2015, 02:42 PM
  2. [SOLVED] Send BCC to admin of single ad contact form
    By jemathewson in forum ClassiPress General Discussion
    Replies: 42
    Last Post: July 12th, 2015, 12:02 AM
  3. contact email - send carbon copy to user
    By cyberpaul in forum ClassiPress General Discussion
    Replies: 1
    Last Post: July 10th, 2014, 05:29 AM
  4. Send a copy to admin of Inquiry Form
    By happyvi in forum ClassiPress General Discussion
    Replies: 1
    Last Post: May 24th, 2014, 07:46 AM
  5. Need to send BCC to admin of single ad contact form on Classipress 3.3.1.
    By pedropaes in forum ClassiPress General Discussion
    Replies: 0
    Last Post: October 29th, 2013, 07:11 AM