473,804 Members | 1,999 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to mail current open Page

Hi All,

How can i mail the current open page? The open page contains some data
(which vary every time page is opened), textbox to enter email id and
send button. When the send button is clicked i want to mail this page as
it is to the given email id.
regards
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 19 '05 #1
3 1237
Hi Kuldeep,
If you are looking to send the content of page as body of the mail to a
recipient then you can follow these steps
1) Keep all the content that has to be mailed inside a panel control.
2) When you send mail the mail format should be Html and the body of the
mail will be the content of the panel.
You can get the content of the panel by using RenderControl. I am pasting
some part of the code which might help you
Dim strWriter As StringWriter = New StringWriter
Dim myTextWriter As HtmlTextWriter = New HtmlTextWriter( strWriter)
Dim mymail As New Mail.MailMessag e
mymail.BodyForm at = MailFormat.Html
Panel1.RenderCo ntrol(myTextWri ter)
mymail.Body = strWriter.ToStr ing
In case you have further questions please revert.
--
The best
srini
http://www.expertszone.com
"Kuldeep" wrote:
Hi All,

How can i mail the current open page? The open page contains some data
(which vary every time page is opened), textbox to enter email id and
send button. When the send button is clicked i want to mail this page as
it is to the given email id.
regards
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com

Nov 19 '05 #2
Rick Strahl did wrote a good post on the subject :

http://west-wind.com/weblog/posts/481.aspx

Let me know if you have any more questions..

Cheers,
Tom Pester
Hi All,

How can i mail the current open page? The open page contains some data
(which vary every time page is opened), textbox to enter email id and
send button. When the send button is clicked i want to mail this page
as it is to the given email id.

regards

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com

Nov 19 '05 #3
Hi everybody,

Thanks for replying to my post and i'm sorry for being late in
responding.

I was able to solve my problem using the following code
Dim wreq As WebRequest =
HttpWebRequest. Create("http://localhost/myPage.aspx")

Dim wrsp As WebResponse = wreq.GetRespons e()
Dim sr As StreamReader = New StreamReader(wr sp.GetResponseS tream())

Dim strHTML As String = sr.ReadToEnd()
sr.Close()

Dim msg As New MailMessage
msg.From = "my**@yahoo.com "
msg.To = "yo****@yahoo.c om"
msg.Subject = "HTML page"
msg.Body = strHTML
msg.BodyFormat = MailFormat.Html
SmtpMail.SmtpSe rver = "localhost"
SmtpMail.Send(m sg)
Regards,
Kuldeep

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1878
by: Stephajn Craig | last post by:
It's been a while since I posted here, but here goes. Our server is a Windows 2000 Server with Service Pack 3, IIS 5 with Lockdown Wizard applied. My first problem is related to CDONTS.NewMail. Up until recently, I had no problems sending e-mail with this little utility. Our current development efforts are moving to .NET so it didn't matter to us that this is something that won't be supported anymore by MS. However, while we are in...
8
5484
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I debug it in PHP designer, it works with no problems, I get the test email. If
2
4296
by: Mike Stephens | last post by:
A contact management application we previously developed for a customer now has a requirement to perform mail merging. Normally request like this would be very simple to solve, we were just point the mail merge data source to the database. But this request is a little bit different. The customer needs to perform the mail merge from the contacts in a dataset. Example In the main contact window the client has the ability to filter contact...
34
18310
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow "127.0.0.1". 4. Authentication: "Anonymous access" only. 5. Outbound connection listen to TCP 25. Besides,
7
2177
by: GeorgeAtkins | last post by:
I want to create a web-based form or page that consists of a series of formatted questions and answers. The form will resemble an existing paper form. When the form is filled in, I want the user to submit the form via e-mail and have the complete form with answers sent, not just the data. That is, the recipient should be able to open the attachment and see (and print) the complete, formatted form. It seems to me that solutions simply...
0
2024
by: Avi | last post by:
A CreateUserWizard contorl receives new user details, adds the user to the database, tries to send a confirmation mail message and stops with a "System.FormatException: The specified string is not in the form required for an e-mail address." Any ideas? --------------------------------------------------------- The CreateUserWizard contorl's code:
1
2450
by: William Connery | last post by:
Hi, I have a small python program with e-mail capabilities that I have pieced together from code snippets found on the internet. The program uses the smtplib module to successfully send an e-mail with an attachment. I want to give users an indication of the percentage of the e-mail that has already been sent so as to avoid frustration when dealing with large attachments or a slow smtp server. But the smtplib module doesn't seem to...
10
3965
by: Frank | last post by:
Hi, I am hoping to find out the differences between the System.Net.Mail and System.Web.Mail. Can some nice folks post the differences; or some urls which show the differences? Great Thanks Frank
0
9711
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9591
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10594
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10343
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10331
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9166
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7631
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5529
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.