$to = Env::v('to');
$subj = Env::v('sujet');
$from = Env::v('from');
- $cc = Env::v('cc');
- $bcc = Env::v('bcc');
+ $cc = trim(Env::v('cc'));
+ $bcc = trim(Env::v('bcc'));
if (empty($to) && empty($cc) && empty($to2) && empty($bcc) && empty($cc2)) {
$page->trig("Indique au moins un destinataire.");
foreach ($files as $name=>&$upload) {
$mymail->addUploadAttachment($upload, $name);
}
- $mymail->setTxtBody(wordwrap($txt, 78, "\n"));
+ if (Env::v('nowiki')) {
+ $mymail->setTxtBody(wordwrap($txt, 78, "\n"));
+ } else {
+ $mymail->setWikiBody($txt);
+ }
if ($mymail->send()) {
$page->trig("Ton mail a bien été envoyé.");
$_REQUEST = array('bcc' => S::v('bestalias').'@'.$globals->mail->domain);