ich versende eine Email mit:
- Code: Alles auswählen
function __sendMailContact($email,$subject,$msg){
$this->Email->sendAs = 'both';
$this->Email->charset = 'iso-8859-1';
$this->Email->to = $email;
$this->Email->subject = $subject;
$this->Email->from = 'Stefan Müller<stefan@....de>';
$this->Email->template = 'contact';
$this->set('msg',$msg);
if ($this->Email->send()){
$this->Session->setFlash('Die Nachricht wurde erfolgreich verschickt!');
$this->redirect(array('action'=>'index'));
} else {
$this->Session->setFlash('Die Nachricht konnte nicht verschickt werden!');
$this->redirect(array('action'=>'index'));
}
}
Das Problem: Die Sonderzeichen aus dem String 'Stefan Müller<stefan@....de>' verschwinden
Aus Stefan Müller wird dann Stefan Mller. Woran kann das liegen?
Viele Grüße ...
//Edit: Habe jetzt ein utf8_encode davor gemacht. So klappt das jetzt aber warum????