Setting the "sent-from" email field for confirmation email

Hello, dear support team / community !

How can the "sent-from" email field for confirmation emails can be changed?

Thank you very much for your help

Regards
zmonk

  • zmonk

    Hello, Predrag!

    Thank you very much for your response!

    It would help me, if you would answer these my additional questions:

    1. What happens if there are more users, which have an admin role? (do they all get appointment notification?)

    2. I've just found, that under WP-Dashboard ->Users -> User XYZ -> Edit
    there is a generic WP-Email-Field for the user account & an Appointment+ Email-Field. To which one is email-confirmation send?

  • zmonk

    Hello, Predrag! I've just overread your answer and understood that i've misunderstood you.

    Appointments+ is using your admin e-mail address which you can change by going to Settings > General panel in your admin section.

    Is there any way to change "sent-from" email field for confirmation email sent by Appointments+ - Plugin without changing the email (under Settings > General), which is used for administrative purposes. (I don't want my client to get all the admin emails from WP - only the appointements notifications)

  • Predrag Dubajic

    Hey @zmonk,

    Sorry for the delay on this thread, we are a bit overwhelmed with tickets.

    You can override the e-mail by adding this code to your themes functions.php file and change the e-mail address:

    function override_admin_email($admin_email){
        $my_custom_email = 'mymail@example.com';
        return $my_custom_email;
    }
    add_filter( 'app_get_admin_email', 'override_admin_email', 999, 1 );

    It would be best to add this to child themes functions.php if you are using one so it doesn't get overwritten by the theme update

    Best regards,
    Predrag

  • zmonk

    Hey, Predrag,

    i very appreciate your answer.

    I've just putted your code into my functions.php, so my functions.php looks like this:

    <?php
    
    function override_admin_email($admin_email){
        $my_custom_email = ‘info@gesund-und-dufte.de’;
        return $my_custom_email;
    }
    
    add_filter( 'app_get_admin_email', 'override_admin_email', 999, 1 );
    
    ?>

    I'm using a child theme, that's why my functions.php is very empty.

    And I'm getting these error:

    Parse error: syntax error, unexpected '@' in /home/content/p3pnexwpnas02_data03/87/2472487/html/wp-content/themes/gesund-und-dufte-v2/functions.php on line 4

    How can i improve these?

  • Predrag Dubajic

    Hey @zmonk,

    It seems there is an issue with the quotation marks around the e-mail address, as you can see from the code you posted those are different from ones that are around the parts inside add_filter().
    Try pasting this one:

    <?php
    
    function override_admin_email($admin_email){
        $my_custom_email = 'info@gesund-und-dufte.de';
        return $my_custom_email;
    }
    
    add_filter( 'app_get_admin_email', 'override_admin_email', 999, 1 );
    
    ?>

    If you are still having issues after pasting try manually changing those quotations and let me know if it works after that.

    Best regards,
    Predrag

  • Jude

    Hi there @@zmonk

    Im sorry the support took some time in the other thread and Im happy you resolved it yourself. This is definitely not usual behaviour here, we are currently experiencing an unusually high volume of new members and support tickets.

    Here is a tip on the best way to get fast support here, its best if you open a new ticket for a separate issue and that way someone always follows up, we sometimes don't monitor resolved threads and your questions may slip through

    I am marking this as resolved, please open another ticket for any new issues you face and we'd be happy to help

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.