I have a controller in my cakefop website that handles a simple contact form. But I have a problem! If I use the contact_controller.php code:
$ this-> Email-> Send ($ this-> Data ['Contact'] ['Message']); I receive an email in my mail box with LineBrue as if the user wrote a message but if I use it:
$ this- & Gt; Email-> Send (); And to create an HTML template to get the variables in the mail, I will not get any line breaks.
How can I fix this?
Which one do you want? In the first case you send a plain text email, you will break your line in place. In the second place you send HTML e-mails, where there are line breaks, but it is only ignored.
Then either keep sending plain text to the mail or use the nl2br () function for HTML output.
Comments
Post a Comment