Support » Plugin: Contact Form 7 » Parameter -f mail@mydomain.it

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi
    I recently had your same problem with tophost and contact form
    the problem is from tophost, it blocks every mail sent without that parameter.
    I have resolved by hacking the wordpress core:
    open wp-includes/class-phpmailer.php
    search the line with
    public $Sender = ”;
    at about line 97, this is an empty string, put your email instead and save the changement.
    now you will receive email, phpmailer automatically set the -f parameter when this string is not empty

    would be great to put a hook filter to control the value of that variable because at every wordpress upgrade you have to rewrite your email

    Oooooohhhh!!! Thank youuuu!! Great solution!!

    I am very happy!!.. 😀

    I just found a better solution, it doesn’t need to hack core

    add_action('phpmailer_init', function($phpmailer){
    	$phpmailer->Sender = $phpmailer->From;
    });

    place it in your functions.php 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Parameter -f mail@mydomain.it’ is closed to new replies.