• I’d like my website to use something like info@example-site-name.com as the email address and “Example Site Name” as the from name. I know I can set this on /wp-admin/admin.php?page=yaysmtp-sendgrid. However, I also wrote a custom plugin and occasionally I’d like to override the preference above and use a different from name/email. How do I do this? I already tried playing with add_filter(‘wp_mail_from’) with a higher and lower priority used on YaySMTP Sendgrid and even add_action(‘phpmailer_init’) with zero luck.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support mialewp

    (@mialewp)

    Hi @srdusky,

    Good day!

    Thanks for reaching out to us.

    Please follow these steps to achieve your goal:

    • Step 1st: Uncheck both Force From Email and Force From Name settings. https://tppr.me/x3xenV
    • Step 2nd: Use add_filter(‘wp_mail_from’) with a higher priority to override From Email.
    • Step 3rd: Use add_filter(‘wp_mail_from_name’) with a higher priority to override.

      Hope that helps.

      If you need any further help, please let us know.

      Mia
    Thread Starter SrDusky

    (@srdusky)

    Thanks, the trick was to add the filter earlier in the flow.

    Plugin Support mialewp

    (@mialewp)

    Hi @srdusky,

    Thank you! Since it’s working now therefore we would like to close this topic.

    Please do not hesitate to contact us if you need any further help.

    Have a nice day!

    Mia

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

The topic ‘Bypass YaySMTP’s From Name/Email’ is closed to new replies.