Sending Email with a message in HTML from a view? |
[eluser]markanderson993[/eluser]
Hello there, I was dabbling around last night in the Email class and tried sending myself an email. This is the code I used. Code: function _send_new_comment_email($author_id,$recipient_id) Now the problem was, when I recieved the email, everything including the html tags were printed out.. why? Do I have to do something special to account for this? And also, it would be a world of difference If I could simple assign the $message value the contents of a specially created View. Is this possible?? Any help is greatly appreciated! Thanks! - Pianoman993
[eluser]pistolPete[/eluser]
You have to set the mailtype according to the user guide: Code: $config['mailtype'] = 'html'; Have a look at Returning views as data: Quote:There is a third optional parameter lets you change the behavior of the function so that it returns data as a string rather than sending it to your browser.
|
Welcome Guest, Not a member yet? Register Sign In |