July 22, 2017, 06:52:58 AM

Author Topic: how can I send images to an email address with php?  (Read 4955 times)

0 Members and 1 Guest are viewing this topic.

harsa

  • Guest
how can I send images to an email address with php?
« on: December 07, 2009, 04:57:48 AM »
hey everybody,

I have a simple form that looks like this:

<form action="mailForm.php" method="post" name="myform" enctype="multipart/form-data">
<input type="hidden" value="some@email.com" name="recipient" />

Image 1:<br />
<input name="userfile" type="file" name="image1" />

Image 2:<br />
<input name="userfile" type="file" name="image2" />

Image 3:<br />
<input name="userfile" type="file" name="image3" />

</form>

what kind of function do I have to write in "mailForm.php" file to make the images send to "some@email.com" ? PLEASE HELP

Offline wilnix

  • mv user /dev/null
  • Administrator
  • Forum Hero
  • *****
  • Posts: 690
  • Country:
  • Gender: Male
  • You're not the fastest packet in the subnet...
    • Wilnix - The NetAdmin's Resource
Re: how can I send images to an email address with php?
« Reply #1 on: January 07, 2010, 02:27:34 PM »
The problem you are having is that you have to change the headers in order to prepare to send the image along with the rest of the message. Take a look at this (and 10K other results from google) for example code (no reason recreating the wheel):

http://www.webdeveloper.com/forum/showthread.php?t=189027

wilnix
alt email address: wilnix@hackphreak.org