Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Date: Fri, 16 Aug 2013 21:26:50 +0200 From: Luuk User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 Newsgroups: comp.lang.php Subject: Re: Email attachment 0bytes using php4 References: <53041805-d7cb-4c72-bec7-c965cd8d1074@googlegroups.com> In-Reply-To: <53041805-d7cb-4c72-bec7-c965cd8d1074@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Lines: 26 NNTP-Posting-Host: 2001:980:9089:1:21d4:d36:de6f:5d47 X-Trace: 1376681401 news.xs4all.nl 16004 [2001:980:9089:1:21d4:d36:de6f:5d47]:37641 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.php:10534 On 16-08-2013 21:09, Dave Drekter wrote: > Ok, don't holler at me, I understand php4 is no longer. That said, for many reasons it's not possible to upgrade to php5 and use phpMailer - as much as I'd like to. I've searched around and there's no other answer presented. So, here's the problem. I create a text file /tmp2/tmporder2 > > The code below sends the email fine with the attachment, but the attachment contains 0 bytes, NADA. > > $path = '/tmp2'; > $filename = 'tmporder2'; > $mailto = 'dave@powerfulhosting.com'; > $from_mail = 'estore order receipt'; > $from_name = 'bagelworks order'; > $replyto = ''; > $subject = 'TESTING EMAIL ATTACHMENT'; > > $file = $path.$filename; $file now contains'/tmp2tmporder2' > > Any ideas why the attached file is blank? > yes, it cannot find your file, because it's not at the location you specified ;)