I'm trying to send an emails with UTF8 characters. Mostly the Email looks how I suspect, but randomly there will be garbage characters. I believe the garbage characters happen when a new line is inserted in the middle of one of the characters. I suspect CakePHP's email component is the culprit since I was reading that it has a feature to insert new lines according to its lineLength property. Is there any way to fix this? I'm using CakePHP 1.3.
$this->Email->to = $sendEmail;
$this->Email->from = empty($this->data['Contact']['email']) ? $sendEmail : $this->data['Contact']['email'];
$this->Email->subject = $subject;
$this->Email->sendAs = 'text';
$this->Email->template = 'contact'
$this->set('fields', $this->data['Contact']);
$this->Email->charset = "utf-8";
$this->Email->headerCharset = "utf-8";
return $this->Email->send();
From the email header:
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit