Enable newlines in offline booking email message

WordPress Event Management, Calendars & Registration Forums General Question Enable newlines in offline booking email message

This topic contains 2 replies, has 2 voices, and was last updated by  Pixelatic 10 years, 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8309

    I’m implementing offline booking emails as outlined here http://wp-event-organiser.com/blog/tutorial/sending-an-email-after-an-offline-booking/ (thanks for the tutorial Stephen) and struggling to get $message to include newlines.

    My code for $message is

     /* Set message */
     $message = "Dear %display_name%" . "\r\n";
     $message .= "Thank you for your booking" . "\r\n";
     $message .= "You will receive a confirmation email once we have received and processed your payment."; 
     $message = eventorganiser_email_template_tags( $message , $booking_id, $template );//Parses the email tags

    At the moment $message is outputting on a single line in the resulting email, which doesn’t look great.

    Is eventorganiser_email_template_tags() stripping newlines – in which case, can I override this – or am I missing something else obvious here?

    Thanks, David

    Pixelatic
    #8310

    Hi David,

    E-mails are sent as HTML, so try replacing the newlines with <br/> tags.

    Stephen Harris
    #8321

    Ah, that explains it – now sorted by using <br/> thanks – David.

    Pixelatic
Viewing 3 posts - 1 through 3 (of 3 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.