• Hi,

    Is it possible to set the sending email address as something other than the ‘default site email address’ ?

    Plus is it possible to send website admin email confirmation to same email address?

    So at the moment the default wp email address is [email protected]

    I want the sending of appointment email to be [email protected] and copy of appointment confirmation sent to [email protected]

    Many thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter wood1e

    (@wood1e)

    Has anyone any idea?

    Plugin Contributor Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @wood1e,

    At the moment Appointments+ by default sends notifications to email set in site settings or/and to service providers.
    To send email notications to another address please try this code

    add_action( 'app_notification_sent', 'app_notification_sent_cb', 99, 3 );
    function app_notification_sent_cb( $body, $r, $app_id ) {
        $email = 'YOUR EMAIL ADDRESS';
        $subject = 'NEW SUBJECT';
        $body = 'YOUR EMAIL CONTENT';
        wp_mail( $email, $subject, $body );
    }

    Here, $body is pre0defined email content, $r is appointment object and $app_id is appointment id.

    You can add those codes in your functions.php in the theme, if you think your theme won’t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name ‘mu-plugins’. If there is no folder in that name, then create a folder, name it ‘mu-plugins’, create a file inside that, give any name you like and paste the code in there. You don’t need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.

    kind regards,
    Kasia

    Thread Starter wood1e

    (@wood1e)

    Hi,

    Many thanks for that, most helpful ??

    Cheers

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sending email – notifications’ is closed to new replies.