Changing sender's email address on confirmation email

Home Forums Ticket Products Event Tickets Plus Changing sender's email address on confirmation email

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1115271
    TEME
    Participant

    I would like to change the email address on the sent confirmation email. Today it says WordPress, and I cannot see where this information is taken from other than it is generated from this plugin.

    Please help me out.

    Regards,

    Teme

    #1115481
    George
    Participant

    Hey @TEME,

    Thanks for reaching out!

    Changing the “sender” email address requires writing custom code. Our plugins simply use the built-in WordPress mail function, so you will have to read about the WordPress mailing function here ? https://developer.wordpress.org/reference/functions/wp_mail/

    From that page, for example:

    Optional filters ‘wp_mail_from‘ and ‘wp_mail_from_name‘ are run on the sender email address and name.

    So you will need to use that wp_mail_from filter, which you can read about here ? https://developer.wordpress.org/reference/hooks/wp_mail_from/

    ⚠️ We cannot help with modifying code, so you will have to take the reins from here. But as a quick example, adding something like this to your theme’s functions.php file should generally do the trick:


    add_filter( 'wp_mail_from', 'tribe_change_wp_mail_from' );

    function tribe_change_wp_mail_from( $from ) {
    return '[email protected]';
    }

    Cheers,
    George

    #1115759
    TEME
    Participant

    Hi George,

    Thank you very much for your quick response. I implemented your last code, and I am nearly there. I hope you can assist me with the final sprint to the finish line.

    With the inserted code I am now able to change the senders email address with the exception of the word WordPress.
    WordPress <[email protected]>

    Is it possible to change WordPress to something else?

    Regards,

    Teme

    #1116095
    George
    Participant

    Sure thing! Look up the wp_mail_from_name filter on that article I linked to above, and add an additional filter like I demonstrated above with wp_mail_from that will change the name.

    If you need additional assistance in writing code, please consult with a developer or the trusty google.com for examples, assistance, and more details on how WordPress filters work.

    Best of luck with your customizations!
    George

    #1121679
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Changing sender's email address on confirmation email’ is closed to new replies.