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
父節點 6cc0d5b1bc
當前提交 a4260e08af
共有 1 個檔案被更改,包括 3 行新增2 行删除

查看文件

@ -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");