17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 2081 Views |
-
Custom form upload file attach in email

19 August 2008 at 11:29pm Last edited: 19 August 2008 11:31pm
Hi Guys
have a custom form related question as to attaching files and emailing them on.
In my fieldset I have:
new FileField ('CV','Upload your CV')
I am using php's mail function to send the email:
mail($email, $subject, $message, "From: ". $data['Email']);
and am unsure as to how I would include this attachment with the email. Does it have to go in as header information? Another solution if at all possible would be if the file could be uploaded so that it can appear in the Files and Images section in the CMS. Anyone know?
thanks!
-
Re: Custom form upload file attach in email

27 August 2008 at 4:16am
Ah yup stupid me you have to put it in the header info of the mail function. You can modify this example:
-
Re: Custom form upload file attach in email

30 August 2008 at 5:01am
The PHP mail() function is extremely insecure. I'd recommend using Silverstripe's built in email classes.
| 2081 Views | ||
|
Page:
1
|
Go to Top |

