email class new line issues [SOLVED] - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: email class new line issues [SOLVED] (/showthread.php?tid=22325) |
email class new line issues [SOLVED] - El Forum - 09-05-2009 [eluser]brainer[/eluser] Hi there, I'm trying to make a new line in my email message body, but what used to work in my old procedural PHP script doesnt work in CodeIgniter. any suggestions? here's my code: Code: $message = 'Hey ' . $effecteduser->username . ",\n"; email class new line issues [SOLVED] - El Forum - 09-05-2009 [eluser]SitesByJoe[/eluser] Are you setting your email to be HTML or plain text? In HTML the "\n" wouldn't appear as expected. email class new line issues [SOLVED] - El Forum - 09-05-2009 [eluser]InsiteFX[/eluser] Use the CodeIgniter Email Class Library. CodeIgniter Users Guide Enjoy InsiteFX email class new line issues [SOLVED] - El Forum - 09-05-2009 [eluser]brainer[/eluser] @InsiteFX - I am using the CodeIgniter email class. ie. $this->ci->email->message($message); @SitesByJoe - Thanks, that was the issue. I needed to change my email config file from Code: $config['mailtype'] = 'html'; Code: $config['mailtype'] = 'text'; |