forked from PHPMailer/PHPMailer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ if (array_key_exists('userfile', $_FILES)) { | |
$mail->setFrom('[email protected]', 'First Last'); | ||
$mail->addAddress('[email protected]', 'John Doe'); | ||
$mail->Subject = 'PHPMailer file sender'; | ||
$mail->msgHTML("My message body"); | ||
$mail->Body = 'My message body'; | ||
// Attach the uploaded file | ||
$mail->addAttachment($uploadfile, 'My uploaded file'); | ||
if (!$mail->send()) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ if (array_key_exists('userfile', $_FILES)) { | |
$mail->setFrom('[email protected]', 'First Last'); | ||
$mail->addAddress('[email protected]', 'John Doe'); | ||
$mail->Subject = 'PHPMailer file sender'; | ||
$mail->msgHTML('My message body'); | ||
$mail->Body = 'My message body'; | ||
//Attach multiple files one by one | ||
for ($ct = 0; $ct < count($_FILES['userfile']['tmp_name']); $ct++) { | ||
$uploadfile = tempnam(sys_get_temp_dir(), sha1($_FILES['userfile']['name'][$ct])); | ||
|