WordPress.org

Forums

Jetpack by WordPress.com
Contact form emails sent from wrong address (3 posts)

  1. al3xclarke
    Member
    Posted 9 months ago #

    I'm using the latest version of Jetpack with WP-Mail-SMTP and have noticed an issue when sending emails via the contact forms.

    Emails are sent from wordpress@www.al3xclarke.co.uk instead of my default email address. This only happens when emails are sent via the contact form (part of Jetpack) and not when sent via the WP-Mail-SMTP test function.

    Does anyone know how to fix this?

    Many thanks,

    Alex

    https://wordpress.org/plugins/jetpack/

  2. Brandon Kraft
    Happiness Engineer
    Plugin Author

    Posted 9 months ago #

    Hi Alex,

    That's correct. The contact form is set to use the wordpress@(blog's domain name0 address with a reply-to of the e-mail address from the contact form sender.

    Can you explain more about why you're wanting this to be different so we can understand your use case better?

    Thanks!

  3. Pepe Huerta
    Member
    Posted 9 months ago #

    If you are comfortable with adding new stuff to your theme, add this to your theme's functions.php:

    //
    // changes email from default "wordpress@yourdomain.com"
    //
    function change_from_email() {
    $message = 'YOUR@DOMAIN.COM';
    return $message;
    }
    add_filter('wp_mail_from', 'change_from_email');

    That will change the "from" address when sending emails from your WordPress, including the contact forms.

    Be aware that using as sender an IP (webserver) that is not approved in your domain's SPF record and DKIM policy, could lead to your emails being flagged as spam by the email providers.

    For example, if you set up "johndoe@gmail.com" as sender, obviously your webserver will not be listed in gmail's approved sender ips to send emails on behalf of gmail.com, so every single message will be delivered directly into spam folders.

    But, if your blog is using gmail's SMTP servers to deliver emails, you are clear of problems since it's actually gmail the one that will send the messages for you.

    It is not as easy as it looks :)

Reply

You must log in to post.

About this Plugin

  • Jetpack by WordPress.com
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic