/**
 * Email template tag: email
 * Full name of the person who made the booking request.
 * 
 * @since  1.0.0
 * @param int $booking_id
 * @return string email
 */
function wprm_email_tag_email($booking_id)
{
    return wprm_get_booking_email($booking_id);
}
Ejemplo n.º 2
0
 /**
  * Send the user a notification upon booking rejection.
  *
  * @since 1.0.0
  * @return void
  */
 function wprm_send_user_notification_rejection($booking_id = 0)
 {
     $email = wprm_get_booking_email($booking_id);
     $subject = wprm_do_email_tags(wprm_get_option('user_booking_rejected_email_subject'), $booking_id);
     $from_name = isset($wprm_options['mail_from_name']) ? $wprm_options['mail_from_name'] : get_bloginfo('name');
     $from_name = apply_filters('wprm_booking_from_name', $from_name, $booking_id);
     $from_email = isset($wprm_options['mail_from_address']) ? $wprm_options['mail_from_address'] : get_option('admin_email');
     $from_email = apply_filters('wprm_booking_from_address', $from_email, $booking_id);
     $message = wpautop(wprm_get_option('user_booking_rejected_email'));
     $message = wprm_do_email_tags($message, $booking_id);
     $headers = "From: " . stripslashes_deep(html_entity_decode($from_name, ENT_COMPAT, 'UTF-8')) . " <{$from_email}>\r\n";
     $headers .= "Reply-To: " . $from_email . "\r\n";
     $headers .= "Content-Type: text/html; charset=utf-8\r\n";
     $headers = apply_filters('wprm_user_booking_notification_rejected_headers', $headers, $booking_id);
     wp_mail($email, $subject, $message, $headers);
 }