Question:
help regarding email with attachment in php?
nandish
2012-03-29 01:09:03 UTC
I am trying to send an email with attachment in php but when the email is send it's in the encoded format .. I think the prob is with my headers ..please check it and inform is there any error..
$header = "From: ".$from_name." <".$from_mail.">\r\n";
$header .= "Reply-To: ".$replyto."\r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-Type: multipart/mixed; boundary=\"".$uid."\"\r\n\r\n";
$header .= "This is a multi-part message in MIME format.\r\n";
$header .= "--".$uid."\r\n";
$header .= "Content-type:text/plain; charset=iso-8859-1\r\n";
$header .= "Content-Transfer-Encoding: 7bit\r\n\r\n";
$header .= $message."\r\n\r\n";
$header .= "--".$uid."\r\n";
$header .= "Content-Type: image/jpg; name=\"".$filename."\"\r\n"; // use different content types here
$header .= "Content-Transfer-Encoding: base64\r\n";
$header .= "Content-Disposition: attachment ; filename=\"".$filename."\"\r\n\r\n";
$header .= $content."\r\n\r\n";
$header .= "--".$uid."--";
Four answers:
anonymous
2012-03-29 04:32:49 UTC
If you have any problem to attach/send php via email you can zip the php file with 7zip or win zip and then try to send it I think it will work fine.

You can download 7zip from here

http://www.filehippo.com/download_7zip_32/
anonymous
2014-08-30 13:25:57 UTC
Ciao,

Per il download di 7zip puoi cliccare su questo link: http://j.mp/1lgaOrt



Da questo link puoi scaricarlo gratuitamente.

Bye
anonymous
2016-10-03 13:50:31 UTC
i've got not gotten something like it by way of Y! Messenger as of yet. you're actual to call this an entire rip-off by way of what became mentioned on your question. this could be dealt with as junk mail; in different words, get rid of it. it is doubtless one among the rip-off messages the place you're able to in no way provide out your very own guidance.
anonymous
2012-03-29 06:22:25 UTC

if(isset($_POST['btnsubmit']))

{

$to=$_POST['to'];

$subject=$_POST['subject'];

$body=$_POST['body'];

$from='shishir06_2007@yahoo.com';

$headers = "From: $from";

mail($to,$subject,$message,$headers);

echo "Mail Sent successfully.";

}

?>















































Mail Form
To
Subject
Body



 











This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...