library email problem with caracter equals "=" - 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: library email problem with caracter equals "=" (/showthread.php?tid=53648) |
library email problem with caracter equals "=" - El Forum - 08-01-2012 [eluser]carlosmupe[/eluser] Dear, I have a problem with the email message body, this is the following, some characters of the email body are replaced by characters like "=", I could solve this, would be a problem with the configuration?, Attached I'm driving the code: $config = array ( 'protocol' => 'smtp', 'smtp_host' => SMTP_HOST, 'smtp_user' => SMTP_USER, 'smtp_pass' => SMTP_PASS, 'mailtype' => 'html', 'charset' => 'utf-8', 'crlf' => '\ r \ n', ); $this-> load-> library ('email', $config); $this-> email-> set_newline ("\r\n"); $this-> email-> set_wordwrap (FALSE); $body = 'Dear (a)'. $ name. ''. $ ape.', <br> '; $body = $body. 'registration has been received at Event: "'. $activity. '" which will be held on:'. $date. "in '. $location.' <br> '; $body = $body. 'Atte., <br>'; $body = $body. '<b> NOTE: </ b> This email is automatically sent, please DO NOT RESPOND.'; $this-> email-> from (SMTP_FROM, SMTP_NOMBREFROM); $this-> email-> to ($ pos_email); $this-> email-> subject ('Notification Event Registration'. $ activity); $this-> email-> message ($ body); $result = $this-> email-> send (); this is result: Dear (a) xxxx, Registration has been received at Ev=nt:"tester talks". which will be held on: 01/08/2012 in the l=s aromos 3221 Atte., NOTE: This email is sent automaticall=, Please DO NOT RESPOND. thanks for all!!! library email problem with caracter equals "=" - El Forum - 08-01-2012 [eluser]Aken[/eluser] The newline and crlf config options should both be set to: Code: $config['newline'] = "\r\n"; Note the double quotes. library email problem with caracter equals "=" - El Forum - 08-01-2012 [eluser]CroNiX[/eluser] Not sure if it has to do with it, but when sending HTML email, it really should have a doctype, html, head, and body tags, just like a regular html page. Perhaps setting a charset in the head will help. library email problem with caracter equals "=" - El Forum - 08-01-2012 [eluser]carlosmupe[/eluser] Dear Lab, SETTING it this way? $config = array ( ‘protocol’ => ‘smtp’, ‘smtp_host’ => SMTP_HOST, ‘smtp_user’ => SMTP_USER, ‘smtp_pass’ => SMTP_PASS, ‘mailtype’ => ‘html’, ‘charset’ => ‘utf-8’, ‘crlf’ => ‘\r\n’, ‘newline’ => ‘\r\n’, ); library email problem with caracter equals "=" - El Forum - 08-01-2012 [eluser]CroNiX[/eluser] No, Aken showed and specifically mentioned using double quotes around the \r\n library email problem with caracter equals "=" - El Forum - 08-01-2012 [eluser]carlosmupe[/eluser] sorry but I do not understand I'm not using double quotes in the configuration of the values r \ n $config = array ( ‘protocol’ => ‘smtp’, ‘smtp_host’ => SMTP_HOST, ‘smtp_user’ => SMTP_USER, ‘smtp_pass’ => SMTP_PASS, ‘mailtype’ => ‘html’, ‘charset’ => ‘utf-8’, * ‘crlf’ => ‘\r\n’, * ‘newline’ => ‘\r\n’, ); library email problem with caracter equals "=" - El Forum - 08-01-2012 [eluser]TWP Marketing[/eluser] Code: $config = array ( Change the single quotes to double quotes for crlf and newline values library email problem with caracter equals "=" - El Forum - 08-02-2012 [eluser]carlosmupe[/eluser] this work fine!!! thanks for lot!!! |