-
Hi, Using PHPMailer with a form to send email attachment. I want to do this securely and safely but also limit attachment file size and file type. Looks like the example file at: I've got the basic file working but now trying to adapt it to limit attachment size and file type. See my updated file below (only relevant section of script is shown). What have I done wrong? Any help appreciated! `//Create a message
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You also asked this question on Stack Overflow, and the comments there tell you what you're doing wrong. In particular, you're attempting to add the files regardless of whether they match your criteria or not, and you're sending the message every time around the loop, which will result in multiple messages, each one with one more attachment than the last. Look at how the original script you based this on works. |
Beta Was this translation helpful? Give feedback.
You also asked this question on Stack Overflow, and the comments there tell you what you're doing wrong. In particular, you're attempting to add the files regardless of whether they match your criteria or not, and you're sending the message every time around the loop, which will result in multiple messages, each one with one more attachment than the last. Look at how the original script you based this on works.