• Resolved perteus

    (@perteus)


    Hi,
    if my users have
    advertisement and other user send him reply, from contact form, this user arrivered email only with body and subject, but not cotact information. Name and email.

    it possyble send all in body email? Like

    Mysitename
    mysite@email

    Subject [reply on your classified]

    Hallo, you have new reply on your advertisement

    Name: [name]
    email:[email]
    subject: [subject]
    body: [text reply]

    other information.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi, hmm from your description i am not exactly sure how do you have WPAdverts setup, it seems you are using both Contact Form and BP Private Messages on Ad details pages and the problem is with the contact form?

    If so then you can customize the message sent from contact form using this snippet https://github.com/simpliko/wpadverts-snippets/blob/master/contact-form-email/contact-form-email.php

    You can format the message using the code below

    
    add_filter( "adverts_contact_form_email", "contact_form_email", 10, 3 );
    function contact_form_email( $mail, $post_id, $form ) {
        $post = get_post( $post_id );
        $mail["message"] = "Hallo, you have new reply on your advertisement\r\n\r\n";
        $mail["message"].= sprintf( "Name %s\r\n", adverts_request( "message_name" ) );
        $mail["message"].= sprintf( "Email %s\r\n", adverts_request( "message_email" ) );
        $mail["message"].= sprintf( "Subject %s\r\n", adverts_request( "message_subject" ) );
        $mail["message"].= sprintf( "Body %s\r\n", adverts_request( "message_body" ) );
        return $mail;
    }
    
    Thread Starter perteus

    (@perteus)

    yes this is for me and work well. Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Email and Private mesage (Buddypress)’ is closed to new replies.