[LUNI] PHP page help please!

James Velguth Penguin at waxmoustache.com
Sat Apr 7 02:42:17 CDT 2007


libMail seems to be a nice kiss approach.  The Sourceforge.net version 
is a bit of a mindstreach for my level of php coding.  I am able to 
attain my goal of emailing myself a file extracted from my MySQL 
database on a weekly basis as a backup.  I still want to learn so if 
anybody has another approach please let me know.  If I do get to the 
point of listserving for my club (an idea that I have already had) I 
will use the phpmailer class.

Many thanks to all who looked and made suggestions. (boy do I need to 
study classes more)

James

Chris McKeever wrote:

> libMail is a good one too;
> http://lwest.free.fr/doc/php/lib/index.php3?page=mail&lang=en
>
> On 4/6/07, Gordon A. Knoppe <gordon at knoppe.net> wrote:
>
>> All the MIME work has already been done for you if you use a class 
>> like phpmailer:
>>
>> http://phpmailer.sourceforge.net/
>>
>>
>> ----- Original Message -----
>> From: James Velguth <Penguin at waxmoustache.com>
>> To: Linux Users Of Northern Illinois - Technical Discussion 
>> <luni at luni.org>
>> Sent: Friday, April 6, 2007 12:14:57 PM GMT-0600 Auto-Detected
>> Subject: Re: [LUNI] PHP page help please!
>>
>> The files are in the same path as the php page.  When I look at the
>> message in view source everything is where I expect it to be.  Thats the
>> message and the encrypted files.  Just nothing in the normal viewing
>> message window.
>>
>> Chris McKeever wrote:
>>
>> > are the files in the same directory as the script? if you make a
>> > script that just displays the file contents using the same logic you
>> > have (ie no path to the file defined) does it show.  You may just be
>> > grabbing air and sending it to yourself
>> >
>> > On 4/6/07, James Velguth <Penguin at waxmoustache.com> wrote:
>> >
>> >> Hi Folks,
>> >>     I know I am a little off topic here but I have a php page that is
>> >> not quite doing what I want.  I want to email to myself a file 
>> from this
>> >> php page.  It runs clean and does send the email with the 
>> attachment and
>> >> I can see that it does so by looking at the message source.  My 
>> Firefox
>> >> does reconize that there is an attachment by putting the paper clip
>> >> opposite the message subject.  The problem is that the message is
>> >> completely blank and there is no window to decode the mime 
>> attachment.
>> >> Here is the php page and any help will be appreciated.  If you 
>> want to
>> >> run it you will have to choose your own target email address and your
>> >> own files.
>> >>
>> >> Thanks in advance for anybodies help.
>> >> James Velguth
>> >>
>> >> <?php
>> >>
>> >> $message="This is the message.";
>> >> $file1="XMZAdmin.csv";
>> >> $file2="XMZGuest.csv";
>> >>
>> >>
>> >>         $boundary1 = "----------" . md5(uniqid(time()));
>> >>
>> >>         $mime = "From: 
>> Webmaster at DuPageRiversFlyTyers.org\r\nReply-to:
>> >> Webmaster at DuPageRiversFlyTyers.org\r\n";
>> >>         $mime .= "MIME-Version: 1.0\r\n";
>> >>         $mime .= "Content-Type: multipart/mixed;\r\n";
>> >>         $mime .= " boundary=\"$boundary1\"\r\n";
>> >>
>> >>         $mime .= "This is a multi-part message in MIME format.\r\n";
>> >>         $mime .= "$boundary1 \r\n";
>> >>         $mime .= "Content-Type: text/plain; charset=ISO-8859-1;
>> >> format=flowed\r\n";
>> >>         $mime .= "Content-Transfer-Encoding: 7bit\r\n";
>> >>
>> >>         $mime .= "\r\n" . $message . "\r\n\r\n";
>> >>
>> >>         $mime .= "$boundary1 \r\n";
>> >>         $mime .= "Content-Type: application/msword;\r\n";
>> >>         $mime .= " name=\"$file1\"\r\n";
>> >>         $mime .= "Content-Transfer-Encoding: base64\r\n";
>> >>         $mime .= "Content-Disposition: inline;\r\n";
>> >>         $mime .= " filename=\"$file1\"\r\n\r\n";
>> >>         $attach = chunk_split(base64_encode(implode("", 
>> file($file1))));
>> >>         $mime .= "$attach";
>> >>
>> >>         $mime .= "$boundary1 \r\n";
>> >>         $mime .= "Content-Type: application/msword;\r\n";
>> >>         $mime .= " name=\"$file2\"\r\n";
>> >>         $mime .= "Content-Transfer-Encoding: base64\r\n";
>> >>         $mime .= "Content-Disposition: inline;\r\n";
>> >>         $mime .= " filename=\"$file2\"\r\n\r\n";
>> >>         $attach = chunk_split(base64_encode(implode("", 
>> file($file2))));
>> >>         $mime .= "$attach";
>> >>
>> >>
>> >>         mail("Webmaster at DuPageRiversFlyTyers.org", 
>> "DupageRiversFlyTyers
>> >> Nightly Maintenance.", "", $mime);
>> >>
>> >> ?>
>> >>
>> >> --
>> >> Linux Users Of Northern Illinois - Technical Discussion
>> >> http://luni.org/mailman/listinfo/luni
>> >>
>> -- 
>> Linux Users Of Northern Illinois - Technical Discussion
>> http://luni.org/mailman/listinfo/luni
>>
>> -- 
>> Linux Users Of Northern Illinois - Technical Discussion
>> http://luni.org/mailman/listinfo/luni
>>


More information about the luni mailing list