开发者

Codeigniter mail attachment encoding issues

I'm sending a email with attachment via a form and I'm having different results depending on the server. My dev server shows everything ok, but the production server shows bad encoding of the email message (accented characters) and the attachment is replaced by a ATT00001.txt‎ file (which is base64 encode).

I'm sending the email as plain text and I should emphasize that it's working perfectly in my dev server which uses smtp too but uses a gmail address. The production server seems to use a kind of MS Outlook Server开发者_开发问答 or such, but is offsite and out of my reach.

This is how the email arrives using the production server:

>     Content-Type: text/plain; charset=utf-8
>     
>     Content-Transfer-Encoding: 8bit
>     
>     Datos Personales:
>     
>     Puesto: Otro test
>     
>     Nombre y Apellido: name
>     
>     Dirección: rhdireccion
>     
>     Teléfono: rhtelefono
>     ...

These are my email setting in my config file:

    $config['protocol'] = 'smtp';
$config['smtp_host'] = 'xxxxxxxxx';
$config['smtp_port'] = 465;
$config['smtp_user'] = 'xxxxxxxxxxx';
$config['smtp_pass'] = 'xxxxxxxxxx';
$config['mailtype']  = 'text';
$config['charset']   = 'iso-8859-1';

$config['rrhh'] = 'xxx@xxxxxxx.com';

I've tried changing the charset to utf-8 and it made no difference. What can I try next?


In my experience , using phpmailer (after converting to a codeigniter library) has been more reliable and useful. Start with this

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜