Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Dake

    (@dakeg)

    Hi @mahidulislamtamim

    Thanks for reaching out and we’re sorry to hear that you are experiencing issues with the Force From Email feature.

    So that we can determine the reason why this is happening.

    What mailer are you using and how did you test email sending to confirm that the Force From Email feature wasn’t working?

    Test Emails can be sent via WP Mail SMTP. Did you see the wrong From Email Address when doing so?

    Please note that other plugins with a similar feature can overwrite our Force From Email feature, so we’d recommend double checking to see if your other plugins/theme are overwriting it.

    Thread Starter Mahidul Islam Tamim

    (@mahidulislamtamim)

    Hi Dake,

    Thanks for your reply. I am using Google / Gmail.

    My code :

    $to = $data['to'];
    $fromEmailAddress = $data['fromEmailAddress'];
    $subject = $data['subject'];
    $content = $data['content'];
    $fromName = $data['fromName'];
    $headers  = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $headers .= 'From: '.$fromName.' <'.$fromEmailAddress.'>' . "\r\n";
    
    wp_mail($to, $subject, $content, $headers, $attachments);

    From name it worked perfectly when I disabled the “Force From Name” option. I disabled the “Force From Email” option, but it still overwrote “From Email Address”.

    Thanks

    Plugin Support Dake

    (@dakeg)

    Hi @mahidulislamtamim

    Thank you for getting back to us and we apologize for the delay.

    As mentioned in our documentation and this blog post, in order to use multiple From Email addresses when connecting to the Google mailer, you will need to set up aliases, so you will not need to utilize custom code.

    Thread Starter Mahidul Islam Tamim

    (@mahidulislamtamim)

    Hi Dake, Thanks for your reply.
    Can you please tell me – What is the effect of the “Force From Email” option? If I enable/disable this, what is the effect on wp_mail() function?
    I found that, if I disable “Force From Name” then my custom from name is shown in the mail. But if I disable “Force From Email”, it does not show my custom from email.
    As the From email will be dynamic, I can not set alias email.

    I just want to change the mail header options.

    $headers .= ‘From: My Form Name<[email protected]>\r\n’;

    wp_mail($to, $subject, $content, $headers, $attachments);

    Plugin Support Dake

    (@dakeg)

    Hi @mahidulislamtamim

    The Gmail mailer does not allow the use of non-authorized From email addresses.

    So, if you attempt to pass a non-authorized email address to the wp_mail function, the authorized email will automatically be used instead, this is why you’d need to look into authorizing any other From email addresses using aliases.

    If you’d like to use different From Email addresses by authorizing a domain instead of an email address, you can consider using one of the other transactional mailers that allow this.

    For example SendLayer (free trial), Brevo (free tier), Mailgun (paid) etc.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘FORCE FROM EMAIL disabled does not work’ is closed to new replies.