Trying to use Luis example mailservice.
Having problems with the renderer not being found.
Just changing the value to personalise it.
I don't understand how the rc.emailView is used.
But until I can get the renderer to work I can't go any further.
// Used by the email layout to render this e-mail's view
rc.emailView = 'notification/admin_notification';
// Create a new mail object
local.Email = mailService.newMail(
from = getSetting('sendEmailFrom')
,subject = 'A new Yaralla Wedding Photography Booking'
);
// Set tokens within the mail object. THe tokens will be evaluated
// by the ColdBox Mail Service. Any matching @key@ within the view
// will be replaced with the token's value
local.Email.setBodyTokens({
booking_list_id = booking.getBooking_List_Id()
,date_of_booking = dateTimeFormat(booking.getDate_Of_Booking(), "medium")
,attendees = booking.getAttendees()
,vehicles = booking.getVehicles()
,firstname = booking.getFirstName()
,surname = booking.getSurName()
,email = booking.getEmail()
,contact_phone1 = booking.getContact_Phone1()
,contact_phone2 = booking.getContact_Phone2()
,comments = booking.getComments()
});
// Add plain text email
local.Email.addMailPart(charset='utf-8',type='text/plain',body=local.Renderer.renderLayout("layout.email.plain"));
// Add HTML email
local.Email.addMailPart(charset='utf-8',type='text/html',body=local.Renderer.renderLayout("layout.email.html"));
// Send the email. MailResult is a boolean.
local.mailResult = mailService.send(local.Email);