473,403 Members | 2,222 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,403 software developers and data experts.

Sending data with a generated email

Hello,

After a user enters their request I'm sending a generated email to
someone. How do I get that question to appear in the email? I have
the link appearing in the email. This is what I have thus far.

Dim ocdoEmail As New Object
ocdoEmail = Server.CreateObject("CDO.Message")
ocdoEmail.To = Session("GetEmail")
ocdoEmail.From = Session("GetEmail")
ocdoEmail.Subject = "EDCS Question"
ocdoEmail.HTMLBody = "<a href=""http://seb2a54/cdpedcsfaqs/
validate.aspx?quesid=" & x & """Click to view question that was
submitted.</a>"
Response.Write("@questions")
'sending the question ID over but going through the validate
page first
ocdoEmail.send()

I put in a Response.Write("@questions") which is the field in the
database but only the link appears. Any suggestions?

Thanks

Sep 5 '07 #1
3 1439
RB
JJ297 wrote:
Hello,

After a user enters their request I'm sending a generated email to
someone. How do I get that question to appear in the email? I have
the link appearing in the email. This is what I have thus far.

Dim ocdoEmail As New Object
ocdoEmail = Server.CreateObject("CDO.Message")
ocdoEmail.To = Session("GetEmail")
ocdoEmail.From = Session("GetEmail")
ocdoEmail.Subject = "EDCS Question"
ocdoEmail.HTMLBody = "<a href=""http://seb2a54/cdpedcsfaqs/
validate.aspx?quesid=" & x & """Click to view question that was
submitted.</a>"
Response.Write("@questions")
'sending the question ID over but going through the validate
page first
ocdoEmail.send()

I put in a Response.Write("@questions") which is the field in the
database but only the link appears. Any suggestions?

Thanks
Hi JJ,

The reason this does not work is because the CDO message object is
basically nothing to do with ASP (except insofar as it relies on IIS to
route the emails it sends). So when you Response.Write you're writing
into the Response stream, which is totally unrelated to CDO.

What you should really be doing is something like this:

Dim myMessage as String
myMessage="<a href=etcetcetc>Click Here </a>"
myMessage += myQuestionsVariable
ocdoEmail.send()

Where myQuestionsVariable is a variable in which you have read the
contents of "@questions" - I'm not really sure what "@questions" is, so
I can't really help with this bit I'm afraid.

Cheers,

RB.
Sep 5 '07 #2
On Sep 5, 10:47 am, RB <owmdkbqziki...@mailinator.comwrote:
JJ297 wrote:
Hello,
After a user enters their request I'm sending a generated email to
someone. How do I get that question to appear in the email? I have
the link appearing in the email. This is what I have thus far.
Dim ocdoEmail As New Object
ocdoEmail = Server.CreateObject("CDO.Message")
ocdoEmail.To = Session("GetEmail")
ocdoEmail.From = Session("GetEmail")
ocdoEmail.Subject = "EDCS Question"
ocdoEmail.HTMLBody = "<a href=""http://seb2a54/cdpedcsfaqs/
validate.aspx?quesid=" & x & """Click to view question that was
submitted.</a>"
Response.Write("@questions")
'sending the question ID over but going through the validate
page first
ocdoEmail.send()
I put in a Response.Write("@questions") which is the field in the
database but only the link appears. Any suggestions?
Thanks

Hi JJ,

The reason this does not work is because the CDO message object is
basically nothing to do with ASP (except insofar as it relies on IIS to
route the emails it sends). So when you Response.Write you're writing
into the Response stream, which is totally unrelated to CDO.

What you should really be doing is something like this:

Dim myMessage as String
myMessage="<a href=etcetcetc>Click Here </a>"
myMessage += myQuestionsVariable
ocdoEmail.send()

Where myQuestionsVariable is a variable in which you have read the
contents of "@questions" - I'm not really sure what "@questions" is, so
I can't really help with this bit I'm afraid.

Cheers,

RB.- Hide quoted text -

- Show quoted text -
Thanks RB actually I got it to work I just added this to the end of
my HTML Body

ocdoEmail.HTMLBody = "<a href=""http://seb2a54/cdpedcsfaqs/
validate.aspx?quesid=" & x & """Click to view question that was
submitted.</a<br /<br />" & Txtquestion.Text

Txtquestion.Text is the name of my field on the page. Sorry if I was
confusing.

Sep 5 '07 #3
RB
<<SNIP>>
>
Thanks RB actually I got it to work I just added this to the end of
my HTML Body

ocdoEmail.HTMLBody = "<a href=""http://seb2a54/cdpedcsfaqs/
validate.aspx?quesid=" & x & """Click to view question that was
submitted.</a<br /<br />" & Txtquestion.Text

Txtquestion.Text is the name of my field on the page. Sorry if I was
confusing.
Sorry - I just noticed a mistake in my code as well - I never actually
set the emails body text!!!

Glad you got it working :-)

RB.
Sep 5 '07 #4

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

Similar topics

3
by: Mike Gorgone | last post by:
Hi All, I'm currently sending email with a backend program that is being used to monitor data in a SQL2000 database. Basically I'm trying to figure out how to add a link to the email body...
5
by: vanisathish | last post by:
Hi All, I need to constantly update some values to the User Interface. In order to do the updation efficiently, i am planning to run some script in the server side that constantly keeps sending...
7
by: Marcin | last post by:
Hello all! A few years ago I created a form with button which let me send an email with an attachment. It was created in Access 97. Now I would like to move this application into Access 2003....
8
by: Philippe Lang | last post by:
Hello, I need to send emails from Postgresql triggers. I was able to do it with a 'plperlu' function, that calls the 'system' perl function, that itself calls the 'mail' shell function. Is...
4
by: Roger Withnell | last post by:
I'm sending Russian text in an email generated from the website which displays in the email as ?????????? The website is set to codepage 65001 and the charset to utf-8. Please advise. ...
1
by: Nick | last post by:
I am working on a website for a client and one of their requirements was to have a mailing list. I decided to XSLT to transform "templates" to HTML so that editing was very easy and less time...
4
by: David Hirschfield | last post by:
I have a pair of programs which trade python data back and forth by pickling up lists of objects on one side (using pickle.HIGHEST_PROTOCOL), and sending that data over a TCP socket connection to...
3
by: raj200809 | last post by:
when i m sending mail i received error from symantec Antivirus" Your email message was unable to be sent because your mail server rejected the message 550-5.7.1 the ip you’re using to send mail is...
10
by: Markgoldin | last post by:
I am sending an XML data from not dontnet process to a .Net via socket listener. Here is a data sample: <VFPData> <serverdata> <coderun>updateFloor</coderun> <area>MD2</area>...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...
0
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...

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.