Re: [PHP] stumped on mailing a complete page

2001-03-05 Thread Chris Adams

On 3 Mar 2001 17:17:15 -0800, Brett <[EMAIL PROTECTED]> wrote:
>I want to send a confirmation email upon receiving an order, and would like
>to send the page that I display on the browser to the user.

ob_start();

// do something

mail('confirm@somewhere', 'confirmation', ob_get_contents());
ob_end_flush();

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] stumped on mailing a complete page

2001-03-03 Thread Simon Garner

From: "Brett" <[EMAIL PROTECTED]>

> This question may have been asked a million times, but I have had no luck
> searching for a difinitive answer.
>
> I want to send a confirmation email upon receiving an order, and would
like
> to send the page that I display on the browser to the user.
>
> I can not figure out how to send a page, like the links that let you mail
a
> page to a friend on some sites.  Any help would be much appreciated.
>
> Thanks,
> Brett


If you want to email them the same page that you sent to the browser, you
can do this using output buffering. In your confirmation page:


";
?>

Thanks for your order!

";

// now mail the page
$mailto = "[EMAIL PROTECTED]";
$mailsubject = "Thanks for your order";
$mailbody = ob_get_contents();
$mailheaders = "From: [EMAIL PROTECTED]\nContent-Type: text/html";

mail($mailto, $mailsubject, $mailbody, $mailheaders);

// and output the page to the browser
ob_end_flush();
?>


But not all mail clients can read HTML email, so it is a good idea to
provide a plain text version of the email as well. You can put both versions
of the mail in the one message using MIME. Try changing the above code
slightly, as follows:





Have a flick through:
http://www.php.net/manual/en/ref.outcontrol.php
http://www.php.net/manual/en/function.mail.php



Cheers

Simon Garner


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] stumped on mailing a complete page

2001-03-03 Thread kevin1

use

$filearray = 
file("http://www.yourstite.com/yourscript.php?some_vars=whatever");

then

$body = join (" ",$filearray);

mail($to $subject,$body);

or something like that. Maybe readfile() may be of use here to. You just 
want to read the page in as a string, so make sure that you use some 
method of HTTP GET to grab the file - then you will have the html source 
seen by the browser. Put that into a string and mail it.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] stumped on mailing a complete page

2001-03-03 Thread Philip Murray

Hi,

This might help, its a script that'll suck in a page from your site and send
it as an HTML email.

Its NOWHERE near perfect, and needs alot of fixing. But it works. It relys
on HTML Mime Mail class from http://www.heyes-computing.net/scripts/. But I
had to make a few changes to the class to make it work in Windows clients.
You have to remove all the \r's and .chr(13)'s.

I hope this helps, I've attached the script I wrote

Cheers

Philip Murray
[EMAIL PROTECTED]


- Original Message -
From: "Brett" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Sent: Sunday, March 04, 2001 2:22 PM
Subject: [PHP] stumped on mailing a complete page


> This question may have been asked a million times, but I have had no luck
> searching for a difinitive answer.
>
> I want to send a confirmation email upon receiving an order, and would
like
> to send the page that I display on the browser to the user.
>
> I can not figure out how to send a page, like the links that let you mail
a
> page to a friend on some sites.  Any help would be much appreciated.
>
> Thanks,
> Brett
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


Re: [PHP] stumped on mailing a complete page

2001-03-03 Thread Lewis Bergman

> This question may have been asked a million times, but I have had no
> luck searching for a difinitive answer.
> 
> I want to send a confirmation email upon receiving an order, and would
> like to send the page that I display on the browser to the user.
> 
> I can not figure out how to send a page, like the links that let you
> mail a page to a friend on some sites.  Any help would be much
> appreciated.
> 
> Thanks,
> Brett
Lets be clear. Do you want to send the page or just the important values 
from the page?

One way I do this is like this:
$successPage =<

[PHP] stumped on mailing a complete page

2001-03-03 Thread Brett

This question may have been asked a million times, but I have had no luck
searching for a difinitive answer.

I want to send a confirmation email upon receiving an order, and would like
to send the page that I display on the browser to the user.

I can not figure out how to send a page, like the links that let you mail a
page to a friend on some sites.  Any help would be much appreciated.

Thanks,
Brett


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]