Welcome Guest, Not a member yet? Register   Sign In
Send email
#1

[eluser]mtavares[/eluser]
Hi,
I set up my controller to send email to a user but when it send one word of message is being modified and it put a "=" in place of other character. For example:

If in message text i have the word "respect" it write "r=spect"... i don't know why?!?

my configuration in controller is...

$ci = get_instance();
$ci->load->library('email');
$config['protocol'] = "smtp";
$config['smtp_host'] = "xxxxx";
$config['smtp_port'] = "25";
$config['smtp_user'] = "xxxxx";
$config['smtp_pass'] = "xxxxx";
$config['charset'] = "utf-8";
$config['mailtype'] = "html";
$config['newline'] = "\r\n";
$config['wordwrap'] = FALSE;




#2

[eluser]InsiteFX[/eluser]
And were is the rest of it?
#3

[eluser]mtavares[/eluser]
$ci->email->initialize($config);

$ci->email->from('[email protected]', 'Administrador da Intranet: DO Transferencias ');
$list = array('[email protected]');
$ci->email->to($list);
$ci->email->subject('Correspondente adicionado');
$ci->email->message('the text of message go here but it break a word to replace with a equal symbol');
$ci->email->send();
#4

[eluser]InsiteFX[/eluser]
You do not need to use $ci-> if your in a Controller just use $this->

You only need the CI Super Object if your in a library helper etc;
#5

[eluser]mtavares[/eluser]
Ok, this make sense...
But i change it and the problem continue... now my code is like that:

$this->load->library('email');
$config['protocol'] = "smtp";
$config['smtp_host'] = "xxxxxxxxxxx";
$config['smtp_port'] = "25";
$config['smtp_user'] = "xxxxx";
$config['smtp_pass'] = "xxxxxxx";
$config['charset'] = "utf-8";
$config['mailtype'] = "html";
$config['newline'] = "\r\n";
//$config['priority'] = $this->input->post('importancia');

$this->email->initialize($config);

$this->email->from('xxxxxx', 'Administrador da Intranet: DO Transferencias ');
$list = array('[email protected]');
$this->email->to($list);
$this->email->subject('Correspondente adicionado');
$this->email->message('12345678901234567890123456789012345678901234567890123456798012345678901324567890');

$this->email->send();



and in the outlook i receive this....

123456789012345678901234567890123456789012345678901234567980123456789013245=7890

in the 76ยบ character it replace always to "="
#6

[eluser]InsiteFX[/eluser]
Add this after your email->send
Code:
echo $this->email->print_debugger();
    exit();

// Also try this:
$this->email->message('{unwrap}12345678901234567890123456789012345678901234567890123456798012345678901324567890{/unwrap}');

If there are errors you should be able to see them.

Outlook sometimes adds characters which you have to change in Outlooks config.

Use the forums POST REPLY for full editor to use the code tags.
#7

[eluser]mtavares[/eluser]
The debbug print....
_____________________________________________________

hello: 250-SERVER.DOMAIN.CV Hello [IPADDRESS]
250-XXXA
250-SIZE
250-ETRN
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-8bitmime
250-BINARYMIME
250-XXXXXXXB
250-VRFY
250-XXXXXXXXXXXXXXXXXXXXXXXC
250-XXXXXXXXXXXD
250-AUTH GSSAPI NTLM LOGIN
250-AUTH=LOGIN
250-XXXXXXXXXXXE
250-XXXXXXF
250 XG

from: 250 2.1.0 [email protected] OK

to: 250 2.1.5 [email protected]

data: 354 Start mail input; end with .

250 2.6.0 <[email protected]> Queued mail for delivery

quit: 221 2.0.0 SERVER.DOMAIN.cv Service closing transmission channel

Your message has been successfully sent using the following protocol: smtp

User-Agent: CodeIgniter
Date: Thu, 26 Jun 2014 15:23:56 -0100
From: "Administrador da Intranet: DO Transferencias "
Return-Path:
To: [email protected]
Subject: =?utf-8?Q?Correspondente_adicionado?=
Reply-To: "[email protected]"
X-Sender: [email protected]
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0


Content-Type: multipart/alternative; boundary="B_ALT_53ac491c2e8d7"

This is a multi-part message in MIME format.
Your email application may not support this format.

--B_ALT_53ac491c2e8d7
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

123456789012345678901234567890123456789012345678901234567980123456789013245
67890


--B_ALT_53ac491c2e8d7
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

123456789012345678901234567890123456789012345678901234567980123456789013245=
67890

--B_ALT_53ac491c2e8d7--
#8

[eluser]InsiteFX[/eluser]
Ok, lets see if maybe it is the character set.

Change:
Code:
// From:
$config['charset'] = "utf-8";

// To:
$config['charset'] = "iso-8859-1";

If that will not work then I would have to say that it is an Outlook options configuration problem.
#9

[eluser]mtavares[/eluser]
I try but, no changes. :-(
#10

[eluser]InsiteFX[/eluser]
Check your Outlook Options - Mail Format - Editor Options - Advanced

Not sure if your using Outlook or Outlook Express.

The = is at the email word wrapping mark. [ position char 76 ]

Code:
$config['wordwrap'] = TRUE;




Theme © iAndrew 2016 - Forum software by © MyBB