You will get a confirmation mail once admin approves the appointment.
Best Regards
$BlogName
";
$subject_to_admin = "$BlogName: One New Appointment has been booked.";
$body_for_admin = "Dear Admin,
One New Appointment Scheduled By '".ucwords($name)."'.
Appointment Details are:
Appointment By: ".ucwords($name)." Appointment For: ".ucwords($ServiceData->name)." Appointment Status: Pending Appointment Date: $appointmentdate Appointment Time: $start_time To $end_time Appointment Note: $note Appointment Key: $appointment_key Take Action:Approve Appointment OR
Cancel Appointment
Login to manage appointment at $BlogName dashboard: Login
Best Regards
$BlogName
";
$AdminEmailDetails = unserialize(get_option('emaildetails'));
$recipent_email = $email;
//send notification & checking mail type
// WP MAIL
if(get_option('emailtype') == 'wpmail')
{
$wpmail_body_for_recipent = "
Dear ".ucwords($name).",
Thank you for scheduling appointment with $BlogName.
Your Appointment Details As:
Appointment For: ".ucwords($ServiceData->name)."
Appointment Note: $note
Appointment Status: Pending
Appointment Date: $appointmentdate
Appointment Time: $start_time To $end_time
Appointment Key: $appointment_key
You will get a confirmation mail once admin approves the appointment.
Best Regards
$BlogName
";
$wpmail_body_for_admin = "
Dear Admin,
One New Appointment Scheduled By '".ucwords($name)."'.
Appointment Details As:
Appointment By: ".ucwords($name)."
Appointment For: ".ucwords($ServiceData->name)."
Appointment Status: Pending
Appointment Date: $appointmentdate
Appointment Time: $start_time To $end_time
Appointment Note: $note
Appointment Key: $appointment_key
Take Action:
Approve Appointment: $MangeAppointmentUrl
OR
Cancel Appointment: $MangeAppointmentUrl
Login to manage appointment at $BlogName dashboard: $BlogUrl
Best Regards
$BlogName
";
$admin_email = $AdminEmailDetails['wpemail'];
$headers[] = "From: Admin <$admin_email>";
//recipent mail
wp_mail( $recipent_email, $subject_to_recipent, $wpmail_body_for_recipent, $headers, $attachments = '' );
// admin mail
wp_mail( $admin_email, $subject_to_admin, $wpmail_body_for_admin, $headers, $attachments = '' );
}
//PHP email
if(get_option('emailtype') == 'phpmail')
{
$phpmail_body_for_recipent = "
Dear ".ucwords($name).",
Thank you for scheduling appointment with $BlogName.
Your Appointment Details As:
Appointment For: ".ucwords($ServiceData->name)."
Appointment Note: $note
Appointment Status: Pending
Appointment Date: $appointmentdate
Appointment Time: $start_time To $end_time
Appointment Key: $appointment_key
You will get a confirmation mail once admin approves the appointment.
Best Regards
$BlogName
";
$phpmail_body_for_admin = "
Dear Admin,
One New Appointment Scheduled By '".ucwords($name)."'.
Appointment Details As:
Appointment By: ".ucwords($name)."
Appointment For: ".ucwords($ServiceData->name)."
Appointment Status: Pending
Appointment Date: $appointmentdate
Appointment Time: $start_time To $end_time
Appointment Note: $note
Appointment Key: $appointment_key
Take Action:
Approve Appointment: $MangeAppointmentUrl
OR
Cancel Appointment: $MangeAppointmentUrl
Login to manage appointment at $BlogName dashboard: $BlogUrl