473,320 Members | 2,164 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.

Get Message Body From another ASP page

Soniad
66
Hello,


I have created a common function in my ASP page to send mail.
so , in every page where mail part is there , this function is called.
I have given three parameters namely : msg,EmailId and Subject.
My Problem is , in one of my page , i have to get message body which is the another ASP page. I can get this using jmail component by using "Jmail.GetMessageBodyFromURL" , but since,I have to pass msg as parameter to my Sendmail function. how can i get this as msg without using jmail component.


Regards,

"D"
Mar 31 '09 #1
1 3020
Soniad
66
Hello,


I got the solution for this problem,i searched on internet and came to know that using "ServerXMLHTTP" we can get another page contents.

Here is the way :

Expand|Select|Wrap|Line Numbers
  1. 'Function to Get Executed message body from another page
  2.  
  3. strURL =  "http://localhost/testurl.asp"
  4.  
  5.  
  6. Function GetHTML(strURL)
  7.      Dim objXMLHTTP, strReturn
  8.      Set objXMLHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
  9.      ' resolve, connect, send, receive - in milliseconds 
  10.      objXMLHTTP.setTimeouts 8000, 80000, 80000, 80000      
  11.      objXMLHTTP.Open "POST", strURL, False
  12.      objXMLHTTP.Send
  13.      strReturn = objXMLHTTP.responseText
  14.      Set objXMLHTTP = Nothing
  15.      GetHTML = strReturn
  16. End Function
  17.  
  18.  
  19. StrResponse =  GetHTML(strURL)
  20.  
  21.  
  22.  
Here's nice description about this :
How do I read the contents of a remote web page?

http://classicasp.aspfaq.com/general...-web-page.html

Regards,
"D"
Apr 1 '09 #2

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

Similar topics

2
by: monika | last post by:
I am not clear ... whether to use alert of JavaScript or messagebox of VBScript in ASP. But what I want is that when a user has some error I want to display a pop-up kind of a thing saying "you...
6
by: Sentinel | last post by:
how can i place a script in body (it must be ran automaticly when html interpreter reaches it) that will redirect to another page? what i am doing is checking in php if login is successful...
2
by: Microsoft News | last post by:
What I have is a message box that pops up. It is another browser window. The code is a general function that you pass message, title and a key to. The box works great except, that if you are on a...
1
by: SMG | last post by:
Hi All, My Send mail system was working very fine, today suddenly it started giving me following error. Can any one suggest why this is happening so. I am using system.Web.Mail "The requested...
24
by: Manuel | last post by:
Is it possible to embed an image, like a company logo in a CDOSYS generated message? If yes, I´ll apreciate some code sample. I´ve been able to format messages in html the way I like, but I...
8
by: Taras_96 | last post by:
Hi everyone, We' ve come to the conclusion that we wish the user to be directed to an error page if javascript is disabled <enter comment about how a webpage shouldn't rely on javascript here :)...
4
by: Jason | last post by:
Hi, Here's the scenario: I have a web application that has window A and window B. A user has both window A and B open - window A is in the foreground and window B is behind it. If the...
3
by: jnag | last post by:
I am trying to implement font changer, where I have links on the banner of the site and when the user clicks on the links, the font size of the page has to change. I tried...
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...
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: 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: 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....
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.