Forums

Contact Form 7
CF7 sending all e-mails From: wordpress@ e-mails (3 posts)

  1. chaos1
    Member
    Posted 7 months ago #

    Strange bug that I noticed, all the forms are sending "From: wordpress@[mydomain.com]". This happens regardless if I specify the From e-mail address. Does anyone know why this is happening?

    I know there's a hook called wp_mail but shouldn't CF7 add the From: to the headers?

    :(

    http://wordpress.org/extend/plugins/contact-form-7/

  2. Takayuki Miyoshi
    Member
    Posted 7 months ago #

    Probably one of your plugins is interfering. Try once deactivating all other plugins.

  3. Rev. Voodoo
    Volunteer Moderator
    Posted 7 months ago #

    // CHANGE OUR EMAIL STUFF FOR SENT EMAILS
    add_filter('wp_mail_from', 'voodoo_mail_from');
    add_filter('wp_mail_from_name', 'voodoo_mail_from_name');
    
    function voodoo_mail_from($old) {
     return 'EMAIL GOES HERE';
    }
    function voodoo_mail_from_name($old) {
     return 'NAME GOES HERE';
    }

    I usually just use the hook. Reason being, it makes all the emails (when people register, etc) come from a proper name/address, more professional looking IMHO

Reply

You must log in to post.

About this Plugin

About this Topic