469,322 Members | 1,615 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,322 developers. It's quick & easy.

Send current htlm page as email

How do I let the user send the current html page they are on as the
message in an email?

I know how to send emails with php, but not how I let the current page
be the message.

I want to do this with code instead of asking the user to click menu
options in his browser.

Kind regards,

Jan Nordgreen
Jun 27 '08 #1
5 4045
damezumari schreef:
How do I let the user send the current html page they are on as the
message in an email?

I know how to send emails with php, but not how I let the current page
be the message.

I want to do this with code instead of asking the user to click menu
options in his browser.
The simplest solution would be to send a "See this page: <link>"
message. Any specific reason why you would need more?
JW
Jun 27 '08 #2
On 4 Jun, 14:17, damezumari <jannordgr...@gmail.comwrote:
How do I let the user send the current html page they are on as the
message in an email?

I know how to send emails with php, but not how I let the current page
be the message.

I want to do this with code instead of asking the user to click menu
options in his browser.

Kind regards,

Jan Nordgreen
Capture the output in a buffer (see ob_start and its associated
functions) and use that in the email.
Jun 27 '08 #3
On 4 Jun, 14:27, Janwillem Borleffs <j...@jwscripts.comwrote:
The simplest solution would be to send a "See this page: <link>"
message. Any specific reason why you would need more?

JW
Depending on how dynamic the page is, by the time the link is viewed,
the contents may be different.
Jun 27 '08 #4
On Wed, 4 Jun 2008 06:17:35 -0700 (PDT), damezumari wrote:
How do I let the user send the current html page they are on as the
message in an email?

I know how to send emails with php, but not how I let the current page
be the message.

I want to do this with code instead of asking the user to click menu
options in his browser.
Maybe wrap it in a system call than runs the CLI version of php for the
same script and redirects to a file that you then load as the body of
email? I haven't spent a lot of time thinking about it, but it's not
something I'd expect PHP to be able to handle all by itself because php
doesn't have any concept of "page" all by itself.

--
42. When I capture the hero, I will make sure I also get his dog, monkey,
ferret, or whatever sickeningly cute little animal capable of untying
ropes and filching keys happens to follow him around.
--Peter Anspach's list of things to do as an Evil Overlord
Jun 27 '08 #5
On Jun 4, 4:17*pm, damezumari <jannordgr...@gmail.comwrote:
How do I let the user send the current html page they are on as the
message in an email?

I know how to send emails with php, but not how I let the current page
be the message.

I want to do this with code instead of asking the user to click menu
options in his browser.

Kind regards,

Jan Nordgreen
You could create html page through php like that;

$output = "<html><head>title</head><body>some content</body></html>";

echo $output;
How ever this approach consumes micro-processor resources very much.

Second solution send the link and show the content in an <iframe>;
Third send a image snapshot;

Although you can send, your content by 2. & 3. way, there is no
gurantee that your content is being displayed because some service
providers such as gmail and yahoo mail, prevent data being displayed
by default, moreover, those services could mark your messages as junk/
spam.

For me the best thing is to send a simple link on a plain message
body..
Jun 27 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Max | last post: by
1 post views Thread by AdamsBlueGuitar | last post: by
4 posts views Thread by jas | last post: by
1 post views Thread by ron | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.