I have tried uploading the files using the below mentioned technique however when I open the uploaded file this is all it contains:
C:\WINDOWS\TEMP\php6E.tmp
Where the .tmp file will change values.
Do you know what could be causing this?
d11wtq wrote:
jayshields wrote:I've never sent an email with an attachment via PHP. It's becoming confusing for me. I decided to use Swift, but I can't find any attachment examples where it sends an email with a user uploaded file; they are always server side files.
Does that mean I have to upload the file, add it as attachment, send the email, then delete the uploaded file? I'm not 100% sure how attachments work anyways - would I have to wait until the user has recieved the email and grabbed the attachment before deleting the uploaded file?
Thanks.
Upload the file, using $_FILES['form_field_name']['tmp_name'] as the path: