newlines in the Email extension

Hi

I am using the email extension for yii. My code is thus…

$email = Yii::app()->email;

$email->to = $modelUserRegistration->email;

$email->from = Yii::app()->params[‘membershipEmail’];

$email->subject = ‘Hello’;

$email->message = ‘Thanks for signing up. \n You are now a member etc etc etc’;

etc…

I cannot see how to get the newline to work in the $email->message. Does anyone know how this is supposed to be done?

Thanks for any advice

gdp

Have you tried to use ‘<br>’?

I’m not familiar with that extension, but maybe double quotations will do:




- $email->message = 'Thanks for signing up. \n You are now a member etc etc etc';

+ $email->message = "Thanks for signing up. \n You are now a member etc etc etc";



now i feel silly - that worked, i thought i had tried it last night (with <br />) but maybe not. thanks!

thanks for reply softark - see below for <br> working.

how to use the $email->view s because i am using it and my code becomes unable to send email but without $email->view using $email->message=‘xyz’ sends the email…Please help me with this as i want to render a view in the template