Page 1 of 1

php code help needed

Posted: Tue Nov 15, 2005 4:42 pm
by ben_albrechts
How do i send images with the next url :

Code: Select all

"files/".$_FILES['imagefile']['name']
to my emailadress.

I have this :

Code: Select all

$message = "Message from $name ($email)\n\nTelephone\n\n$telephone\n\nAddress:\n\n$address\n\nDesign:\n\n$design\n\nColour Tshirt: $colour\n\nPrinted on $side\n\nSize:\n\n$size\n\nQuantity:\n\n$amount\n\nPayment:\n\n$payment\n\nComments:\n\n$comments";

            mail("order@pictureitprints.co.uk", "Order", "$message");

But I need to add that image in the email , or if impossible at least a link to the image and it isnt working.
Help please

Posted: Tue Nov 15, 2005 4:44 pm
by timvw
The easiest is to use http://phpmailer.sf.net.

Posted: Tue Nov 15, 2005 4:53 pm
by ben_albrechts
I dont understand any of that site. I'm new to this whole php thing.
There must be a simple way to just add a link to the image in the mail with the code that i already have?

Posted: Tue Nov 15, 2005 5:27 pm
by duk
hummm... are you puting the headers correctly??

if yes you can use HTML...

to display the image you just need to use <img src="domain/jpg">

the headers:

Code: Select all

$headers  = "MIME-Version: 1.0\n";
 $headers .= "Content-type: text/html; charset=iso-8859-1\n";