Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Attaching a File to a Form Re: Attaching a File to a Form

#69362
lyleyboy
Member
Quote:
Is there anyway to send an attachment without uploading to the server? I’ve tried PHPMailer and I can’t get anywhere with it. I tried SwiftMailer and our mail server doesn’t like it.

Not as far as I know. The problem with that concept is that the browser, and therefore the internet, is sandboxed from the rest of your computer. THis basically means that the browser has no access to the file to be able to attach it to the email.

Just imagine it in a larger scale. Effectively you’re running a program (you PHP) on a computer in a different location, over the web. Compare this to trying to email a file that is on the computer upstairs from the computer downstairs. It’s not there is it?

I hope that’s clear and if it’s too simplified I apologize.

So it’s all working then?

Don’t forget to clear down the temp folder that you’re uploading to.