attach file to email using php -


I have an input on my form to allow me to browse at a file location. They can resume the application that is ready for submission.

  & lt; Label class = "description" for = "element_5" & gt; Upload a file & lt; / Labels & gt; & Lt; Div & gt; & Lt; Input id = "element_5" name = "element_5" class = "element file" type = "file" />  

For some of my text fields and dropdowns I am using something with the lines of

  $ experince = $ _POST ["experince"];  

But I do not want the path string that I want the acetol file. How can I get the file myself and how do I add it to e-mail

Is there an easy way to limit the bonus to .doc / .pdf?

I've done something like this recently. It's not trivial.

Your email message must be multipart mime message. You can read it in your file, encode it (using base 64), then place it in the correct position in your email message string.

It looks like a decent tutorial (which I had found earlier):

But note that tutorials have some issues to avoid:

  $ Message "" Nn ";  

should be:

  $ message" \ n \ n ";  

You can also look in the Mail_Mime PEAR package for help:


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -