Table des matières

Concrete5: Envoyer un mail (sendmail)

c5.6 integrated mail

Doc

$bodyHTML .= '<!DOCTYPE html>';
$bodyHTML .= '<html lang="fr">';
$bodyHTML .= '  <head>';
$bodyHTML .= '      <meta charset="utf-8">';
$bodyHTML .= '  </head>';
$bodyHTML .= '  <body>';
$bodyHTML .= '      <div>';
$bodyHTML .= $Message;
$bodyHTML .= '      </div>';
$bodyHTML .= '  </body>';
$bodyHTML .= '</html>';
 
$mh = Loader::helper('mail');
$mh->getTesting();
$mh->setSubject($Sujet);
$mh->setBody($bodyHTML);
$mh->setBodyHTML($bodyHTML);
$mh->to($Destinataire);
$mh->from($maildest);
$mh->sendMail();

c57

http://documentation.concrete5.org/developers/sending-mail/working-mail-service