[LUNI] PHP page help please!
Michael Knoop
mknoop at uic.edu
Fri Apr 6 10:34:10 CDT 2007
Well, for one thing, you missed putting the message in the mail function
call. The third parameter should be $message -
mail("Webmaster at DuPageRiversFlyTyers.org", "DupageRiversFlyTyers Nightly
Maintenance.", "$message", $mime);
I do not know if this will fix the missing window problem, but it might.
At 02:04 AM 4/6/07, you 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
More information about the luni
mailing list