473,320 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 4344
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Max | last post by:
I am looking for some simple example code on generating SMTP e-mail messages in Python. I have a script that sends system reports to me at a central e-mail address, and it works fine using smtplib...
2
by: Mark | last post by:
How would I send an email to someone from a webpage with a link to the current page? I've seen this where you can put in your email, the person's email that you are sending teh page to, a subject...
1
by: AdamsBlueGuitar | last post by:
Here's the situation. I have a page with 2 tables on it. In table one, are several links. The I want the content of the links to show up in table two. I think this can be done by nameing table...
41
by: CMAR | last post by:
What are the pluses and minuses of constructing and validating between XHTML Transitional vs. HTLM 4.01 Strict Thanks, CMA
4
by: jas | last post by:
I have a basic client/server socket situation setup....where the server accepts a connection and then waits for commands. On the client side, I create a socket, connect to the server...then I...
1
by: Fei Li | last post by:
Hi, why PrintDocument.PrintPage() does not send me the current page information? Regards
2
by: Ryan | last post by:
Hi, I receive an access denied error (see below) when attempting to send an email with BodyFormat=MailFormat.Html from an asp.net page. Exactly the same code works fine in a console...
1
by: ron | last post by:
Does anybody know how to implement the functionality of sending the current page by email? IE does provide the function: Tools->Mail and News->Send Page... Thanks!
4
by: gurufordy | last post by:
Hello. Trying to use the ASP.net user functionality but it keeps failing on me. I have created a login and registration page for my site. When you fill in the registration form it should send a...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.