Welcome Guest, Not a member yet? Register   Sign In
library email problem with caracter equals "="
#1

[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!!!
#2

[eluser]Aken[/eluser]
The newline and crlf config options should both be set to:

Code:
$config['newline'] = "\r\n";
$config['crlf'] = "\r\n";

Note the double quotes.
#3

[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.
#4

[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’,
);
#5

[eluser]CroNiX[/eluser]
No, Aken showed and specifically mentioned using double quotes around the \r\n
#6

[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’,
);
#7

[eluser]TWP Marketing[/eluser]
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",
‘newline’   => "\r\n",
);

Change the single quotes to double quotes for crlf and newline values
#8

[eluser]carlosmupe[/eluser]
this work fine!!!

thanks for lot!!!




Theme © iAndrew 2016 - Forum software by © MyBB