i2-Services, Inc. Forums

Full Version: Mail with file attached
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I just got started with PHP Form to e-mail. Great tool, very easy to use. There is only one thing I can't find. How can I send an uploaded file directly with an e-mail as an attachment? I've seen I can attach a file, but then the file has to be already in the "attachments" folder. I want to send it directly after the form is submitted.

Thanks in advance,
Rene
Rene,

Hey there. If you set the variable:

define('CFG_Attach_to_Email', '1' ); // If SMTP Enabled, Attach Uploads to Admin e-Mail?

in /configs/config.php

It will attach the e-mail to the admin e-mail.

note you must have SMTP enabled:

define('CFG_SMTP_Email', '1' ); // use SMTP Mail Server (other than default)

and working.
Thanks, it is working great now.
Good to hear! Quite welcome.
Reference URL's