Enhance a little the mail send (add an HTML test). re #121

Proposed by Evrick.
This commit is contained in:
Sébastien Lucas 2013-12-16 21:36:44 +01:00
parent 6cc0d5b1bc
commit a4260e08af

View file

@ -55,9 +55,10 @@ foreach (explode (";", $emailDest) as $emailAddress) {
$mail->AddAttachment($data->getLocalPath ());
$mail->IsHTML(false);
$mail->IsHTML(true);
$mail->Subject = 'Sent by COPS : ' . $data->getUpdatedFilename ();
$mail->Body = 'Sent by COPS';
$mail->Body = "<h1>" . $book->title . "</h1><h2>" . $book->getAuthorsName () . "</h2>" . $book->getComment ();
$mail->AltBody = "Sent by COPS";
if (!$mail->Send()) {
echo localize ("mail.messagenotsent");