20201112
This commit is contained in:
@@ -72,12 +72,12 @@ function sendEmail($email = '', $title = '', $from_name = '', $content = '', $me
|
||||
$mail->AltBody = '';
|
||||
if (is_array($attachmentFile)) {
|
||||
for ($i = 0; $i < count($attachmentFile); $i++) {
|
||||
$mail->addAttachment($attachmentFile[$i], 'thanks.pdf' . $i); //这里可以是多维数组,然后循环附件的文件和名称
|
||||
$mail->addAttachment($attachmentFile[$i], 'thanks.jpg' . $i); //这里可以是多维数组,然后循环附件的文件和名称
|
||||
}
|
||||
} else {
|
||||
if ($attachmentFile != '') {
|
||||
//Attach an image file
|
||||
$mail->addAttachment($attachmentFile, 'thanks.pdf');
|
||||
$mail->addAttachment($attachmentFile, 'thanks.jpg');
|
||||
}
|
||||
}
|
||||
//send the message, check for errors
|
||||
|
||||
Reference in New Issue
Block a user