tag:blogger.com,1999:blog-6780330443694982799.post583168643223073791..comments2017-01-28T02:57:05.291-08:00Comments on Daily Coding Blog: Sending mail Attachment(s) with PHP mail function (PART - II) : The CodeUnknownnoreply@blogger.comBlogger5125tag:blogger.com,1999:blog-6780330443694982799.post-76636177112120291212009-08-18T08:13:20.246-07:002009-08-18T08:13:20.246-07:00From Tom
Hi Souray
first of all thank you so much...From Tom<br /><br />Hi Souray<br />first of all thank you so much for posting this script, however i have a little problem all attachments i sent get somehow corrupted the files ( zip format) shows up as 0KB, when I try to unzip them there is no content inside, i tried with many files types same problem. <br /><br />Not sure what I am doing wrong?<br /><br />Thank you.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6780330443694982799.post-76803138276660048922009-04-08T18:50:00.000-07:002009-04-08T18:50:00.000-07:00Hi Souray,Not sure if it depends on the email clie...Hi Souray,<BR/><BR/>Not sure if it depends on the email client? I used your code to mail Outlook and the way the line breaks were being outputted totally confused Outlook.<BR/><BR/>Specifically, the Content-Type: text/plain; charset=iso-8859-1 and Content-Transfer-Encoding: 7bit headers showed up INSIDE the message, and the 100k attachment showed up as 137 bytes.<BR/><BR/>It appears to me, at Unknownhttps://www.blogger.com/profile/07852289625323430361noreply@blogger.comtag:blogger.com,1999:blog-6780330443694982799.post-19921334049293562282009-04-08T06:16:00.000-07:002009-04-08T06:16:00.000-07:00@Jim ... Your problems seems to be a strange one b...@Jim ... Your problems seems to be a strange one because I can see what you have done is mostly manipulate the line breaks in the headers <BR/>1. you reduce 1 \r\n when we first time starts mime boundary<BR/>2. you increase 1 \r\n after adding the Content-Transfer-Encoding for actual message<BR/>3. you you also put an addition \r\n after Content-Disposition of each file<BR/><BR/>I don't Sourav Rayhttps://www.blogger.com/profile/09896765324606004321noreply@blogger.comtag:blogger.com,1999:blog-6780330443694982799.post-78364457876994047332009-04-08T01:42:00.000-07:002009-04-08T01:42:00.000-07:00Thank you for this code. However it didn't work fo...Thank you for this code. However it didn't work for me as is due to line feeds being in the wrong places. Specifically, there was one too many linefeeds after the first mime boundary, one too few line feeds after the 7-bit content transfer encoding header line, and one too few line feeds after the Content disposition header line. I changed it to the following and it worked:<BR/><BR/> $Unknownhttps://www.blogger.com/profile/07852289625323430361noreply@blogger.comtag:blogger.com,1999:blog-6780330443694982799.post-68860963661628279862009-04-07T12:02:00.000-07:002009-04-07T12:02:00.000-07:00Can you show an example of the sendMail function w...Can you show an example of the sendMail function when using attachments? Thank you!Hayleyhttps://www.blogger.com/profile/16714020809000813205noreply@blogger.com