473,322 Members | 1,409 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,322 software developers and data experts.

problem in mailing a webpage

HI

I am trying to mail a web page in asp.net. Some of the pages get mailed bhut some are giving error "The remote server returned an error: (500) Internal Server Error. ". I fail to understand this?

Here's the code m using

Dim mymail As New MailMessage()
Dim mailcontenturl As String = "http://localhost:9000/mailchk/WebForm1.aspx"
mymail.From = "ashima@yahoo.com"
mymail.To = "ashima@gmail.com"
mymail.Subject = "Test Mail Delivery"
mymail.BodyFormat = MailFormat.Html
mymail.Body = getHTML(mailcontenturl)
mymail.Priority = MailPriority.High
mymail.UrlContentBase = mailcontenturl
SmtpMail.Send(mymail)
Response.Write("mail sent")

End Sub

Private Function getHTML(ByVal url As String) As String

Dim wreq As HttpWebRequest
wreq = HttpWebRequest.Create(url)

Dim p As New WebProxy("http://isasrv.del.techbooks.com:8080")
wreq.Proxy = p


wreq.Credentials = CredentialCache.DefaultCredentials
Dim wres As HttpWebResponse

wres = wreq.GetResponse()

Dim sr As New StreamReader(wres.GetResponseStream(), System.Text.Encoding.UTF8)
Dim result As String = sr.ReadToEnd()
sr.Close()
wreq.Timeout = 10000
' wreq.KeepAlive = False

Return result

End Function

Pls suggest what m doing wrong.

Thanks & Regards,
Ashima
Nov 25 '06 #1
0 749

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Varun Hiremath | last post by:
Hello everybody, I was trying to install pythoncard on my system and I got this error. I am using an unstable version of Debian. Can someone tell me what the error could be. Is it because I am...
4
by: Catherine Jo Morgan | last post by:
This is still for the db for the recreational tree climbing business. I thought I'd solved the problem of clients often being part of the same household, with a tblHouseholds, with Household as a...
1
by: kkrizl | last post by:
I have a form that displays general information about an alarm permit location. There's a subform that shows detailed information about burglar alarms that have gone off at the location. When a...
2
by: Jake Barnes | last post by:
Imagine I've this block of HTML: <p>Alex Schein Mailing List <input type="checkbox" name="newslettersToUse" value="133156"> (<a href="mcControlPanel.php"...
3
by: swangdb | last post by:
I have a Sun Server running Solaris 10 and Sendmail 8.13.7. I have Majordomo and Listproc installed on this server and they work. I have several production majordomo and listproc mailing lists...
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...
1
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.