• Resolved tarzan61

    (@tarzan61)


    My CF7 form comes from the emaill address <[email protected]>. I want to change that to the actual email address of the sender but I don’t know how. I have an autoresponder set up in outlook and the <[email protected]> is not the right email address to respond to.

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • In the Admin, go Contact -> Contact Forms, click “edit” for your contact form, click the “Mail” tab, change the “From” email address to the correct sender.

    Thread Starter tarzan61

    (@tarzan61)

    I think you missed the point.

    I’m the sender, the form sends the email to me: <myemail>

    When the contact form sends me who its from it gives me there name John smith and replaces their email with <[email protected]>.

    I want it show their name and their email address in the email send to me and REMOVE the <[email protected]>.

    I just don’t know what the proper code is for the email???

    I’m guessing its something like <[email protected]>

    Do you understand now?

    • This reply was modified 7 years, 5 months ago by tarzan61.

    Okay, I think I’m with you now.

    First of all, I should mention that for DMARC compliance, you want to make sure the “From” email is from your domain.

    To get the correct codes for fields in your contact form, take a look on the Form tab of the contact form in question. There you will find the codes you need. For example, the default for the submitter’s name is “your-name” and for their email address is “your-email”, so on the Mail tab, look in the Message Body section. There you will want something like the following:

    
    From: [your-name] <[your-email]>
    Subject: [your-subject]
    
    Message Body:
    [your-message]
    
    --
    This e-mail was sent from a contact form on Your Site Name (https://yourdomain.com)
    
    Thread Starter tarzan61

    (@tarzan61)

    I am in DMARC compliance. Thanks.

    I still think your confused here.

    CF7 sends me an email from the wordpress system with the message in the format in setup.

    In the CF7 mail tab it appears like this

    To: this email is sent to me
    From: this is the user that filled in the form.

    I want the FROM email (users email) to replace <[email protected]>

    Example: if linux4me2 was the user he would fill out the form; The form would be sent to me and the email next to his name is <[email protected]>.

    I want it to be linux4me2 <[email protected]>

    Do you follow??

    Thread Starter tarzan61

    (@tarzan61)

    Forget it, it cannot be done.

    What a stupid way to design a form

    • This reply was modified 7 years, 5 months ago by tarzan61.
    Chadest

    (@chadest)

    Hey @tarzan61, Did you find a work around?

    I have this same issue. The user fills out the form, supplies their email address, but when we admins receive the form data we can’t configure it to come from the user-supplied address??? How do you respond and communicate with them from this point?

    Really seems like the from field on the mail tab should be: [your-name][your-email]

    How is everyone else doing this? I saw the note about this email address needing to be from the host’s domain—but beyond ‘spam rules’ I don’t understand why. Can it be a fake email from the domain?

    Thread Starter tarzan61

    (@tarzan61)

    I configured it from the host domain email. I simply changed the host domain email to my catch all. If you have multiple users it wont work.

    I have since switched to mailchimp, not because of this issue I liked CF7, it was a better option for me. There may be a better solution for you.

    Best wishes.

    Taked from.

    https://karunshakya.com.np/update-change-recipient-e-mail-address-in-contact-form-7/

    // hook into wpcf7_before_send_mail
    add_action( 'wpcf7_before_send_mail', function($contact_form){
     
    // create new instance of WPCF7_Submission class
    $submission = WPCF7_Submission::get_instance();
     
    // email address you want to change
    $toEmail = '[email protected]';
     
    // set the email address to recipient
    $mailProp = $contact_form->get_properties('mail');
    $mailProp['mail']['recipient'] = $toEmail;
     
    // update the form properties
    $contact_form->set_properties(array('mail' => $mailProp['mail']));
     
    });
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Contact Form 7: Change sender Email’ is closed to new replies.