Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #780431

    Hi All,

    I have been trying to fix an issue with the mail.
    I am able to manipulate the from address and get the forms working fine with:

    function change_cf_from() {
        return " (Email address hidden if logged out) ";
    }
    add_filter('avf_form_from', 'change_cf_from', 10);

    However I would like to be able to get the reply-to emailaddress set to the email filled in on the form.
    My guess would be something like:

    function change_cf_reply-to() {
        return " (Email address hidden if logged out) ";
    }
    add_filter('avf_form_reply-to', 'change_cf_reply-to', 20);

    Bu this ofcourse is just imagination. Is there a function to do this?

    regards,
    T

    #781171

    Hey borkent,

    Please try using following code

    function change_cf_sendto($field_value) {
        $field_value = apply_filters( "avf_form_mail_field_values", nl2br(urldecode($new_post[$key])), $new_post, $this->form_elements, $this->form_params, $element, $key );
        return $field_value; 
    }
    add_filter('avf_form_sendto', 'change_cf_sendto', 10);

    It would be a lot easier to achieve what you would like using more advanced form plugins such as Contact Form 7 :)

    Best regards,
    Yigit

    #781181

    Hi Yigit,

    thanks. Tested and does not work, when added to functions below the above function that forces the sender, form (SMTP) does not send out any mail.

    Basically its not totally related to the form. Its related to the smtp settings.
    The smtp does not allow sending with someone elses emailaddress as that would be spoofing.

    Host reply:

    Sending emails on behalf of the user’s email (any email they fill in while submitting the form) has not been allowed on our server and is not a recent change.

    This is because it would basically require ‘spoofing’ their email which most servers do not allow.

    Kind of strange as it used to work fine, but suddenly since some upgrade the phpmail function stopped sending mail. Thus rendering the forms useless and allot of lost inputs.

    So I was reading around and seeing that many people have this issue. The first filter above does fix the problem, however it removes the functionality of being able to reply to the emails that come in.

    Therefor I was hoping to be able to send the mail with the (Email address hidden if logged out) email and have a seperate reply-to set as the users email. So that the smtp will send the email and the email would be reply-able

    crazy stuff.

    T

    #782942

    Hi T,

    As Yigit mentioned above, Contact Form 7 might be a better solution for you.

    If you need further assistance please let us know.
    Best regards,
    Victoria

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.