PHP ATTACMENT PROBLEM
Posted: Fri Jun 24, 2011 10:58 am
Hy everyone, i found lot of code in the internet for sending mail with attachment, but i not sucsed to make it to work.
Here is my code and if someone can help me i will bi thankefull to him.
<?php
$userName=$_POST["userName"];
$userEmail=$_POST["userEmail"];
$userComments=$_POST["userComments"];
$userAddress=$_POST["userAddress"];
$userPhone=$_POST["userPhone"];
$itemList=$_POST["itemList"];
$totalItems=$_POST["totalItems"];
$totalPrice=$_POST["totalPrice"];
$MailTo = "$userEmail, nidvanitri@msn.com";
$Subject = "Poruka";
$Body = "<font size=5><font color=#0066FF><b><u>Lista elemenata koriscenih u planeru</u>: </b></font></font><br><br><font size=2><B><font color=#0066FF>Od: </font></B>$userName<BR><font
size=2><B><font color=#0066FF>Address: </font></B>$userAddress<BR><B><font color=#0066FF>Telefon: </font></B>$userPhone<BR><font size=2><B><font color=#0066FF>Email: </font></B><A HREF=mailto:$userEmail>$userEmail</A><BR><BR><B><font color=#0066FF>Elementi: </font></B><BR>$itemList<BR><BR><BR><B><font color=#0066FF>Ukupno elemenata: </font></B>$totalItems<BR><B><font color=#0066FF>Ukupna cena: </font></B>$totalPrice<BR><BR><B><font color=#0066FF>Komentar korisnika: </font></B>$userComments<BR>";
$headers = "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: Online planer";
$sendMail = mail($MailTo, "$Subject", "$Body", "$headers");
if(sendMail) {
echo ("&mailSent=USPELO!");}
else {
echo ("&mailSent=NEUSPELO!");}
?>
Here is my code and if someone can help me i will bi thankefull to him.
<?php
$userName=$_POST["userName"];
$userEmail=$_POST["userEmail"];
$userComments=$_POST["userComments"];
$userAddress=$_POST["userAddress"];
$userPhone=$_POST["userPhone"];
$itemList=$_POST["itemList"];
$totalItems=$_POST["totalItems"];
$totalPrice=$_POST["totalPrice"];
$MailTo = "$userEmail, nidvanitri@msn.com";
$Subject = "Poruka";
$Body = "<font size=5><font color=#0066FF><b><u>Lista elemenata koriscenih u planeru</u>: </b></font></font><br><br><font size=2><B><font color=#0066FF>Od: </font></B>$userName<BR><font
size=2><B><font color=#0066FF>Address: </font></B>$userAddress<BR><B><font color=#0066FF>Telefon: </font></B>$userPhone<BR><font size=2><B><font color=#0066FF>Email: </font></B><A HREF=mailto:$userEmail>$userEmail</A><BR><BR><B><font color=#0066FF>Elementi: </font></B><BR>$itemList<BR><BR><BR><B><font color=#0066FF>Ukupno elemenata: </font></B>$totalItems<BR><B><font color=#0066FF>Ukupna cena: </font></B>$totalPrice<BR><BR><B><font color=#0066FF>Komentar korisnika: </font></B>$userComments<BR>";
$headers = "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: Online planer";
$sendMail = mail($MailTo, "$Subject", "$Body", "$headers");
if(sendMail) {
echo ("&mailSent=USPELO!");}
else {
echo ("&mailSent=NEUSPELO!");}
?>