473,830 Members | 2,215 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CDONT-Autoresponder

When a form is filled in on my website it is sent to the below .asp page. I
want the information from the form to be sent to me, which it does, but I
would also like a confirmation email to be sent to the user. Is there
anything i can add to the code below to do this?
<%
dim contactName, contactEmail, contactMessage, isSubmitted, nameRequired,
EmailRequired

isSubmitted = request.form("s ubmit")

If isSubmitted <> "isSubmit" Then
contactName = ""
contactEmail = ""
contactMessage = ""
nameRequiredMes sage =""
EmailRequiredMe ssage =""
Else
contactName = request.form("n ame")
contactEmail = request.form("e mail")
contactMessage = request.form("m essage")
End If

if contactName="" then
nameRequiredMes sage = "Please enter your Name"
end if

if contactEmail="" then
EmailRequiredMe ssage = "Please enter your Email"
end if

If contactName<>"" and contactEmail<>" " then
Dim objCDONTS ' Email object
Dim strSubject, strBody ' Message
Dim misccompo

Set objCDONTS = Server.CreateOb ject("CDONTS.Ne wMail")
objCDONTS.From = contactName & " <" & contactEmail & ">"
objCDONTS.To = "ma**@dcs-imago.com"
objCDONTS.Subje ct = "dcs"
objCDONTS.Body = "--------------------------------------" & vbcrlf & vbcrlf
& contactMessage & vbcrlf & vbcrlf & vbcrlf &
"--------------------------------------------------------------" & vbcrlf &
"MESSAGE ENDS: End of message"
objCDONTS.Send
Set objCDONTS = Nothing

response.redire ct "thanks.asp "
response.end
end if
%>
%>
Jul 19 '05 #1
1 4114
Sure, set up another snippet for sending mail, set the *recipient* to
request.form("e mail"), and change the body.

How is it any different setting:

objCDONTS.To = "ma**@dcs-imago.com"

to

objCDONTS.To = request.form("e mail")

?

"Mark" <No@Email.com > wrote in message
news:bg******** **@titan.btinte rnet.com...
When a form is filled in on my website it is sent to the below .asp page. I want the information from the form to be sent to me, which it does, but I
would also like a confirmation email to be sent to the user. Is there
anything i can add to the code below to do this?
<%
dim contactName, contactEmail, contactMessage, isSubmitted, nameRequired,
EmailRequired

isSubmitted = request.form("s ubmit")

If isSubmitted <> "isSubmit" Then
contactName = ""
contactEmail = ""
contactMessage = ""
nameRequiredMes sage =""
EmailRequiredMe ssage =""
Else
contactName = request.form("n ame")
contactEmail = request.form("e mail")
contactMessage = request.form("m essage")
End If

if contactName="" then
nameRequiredMes sage = "Please enter your Name"
end if

if contactEmail="" then
EmailRequiredMe ssage = "Please enter your Email"
end if

If contactName<>"" and contactEmail<>" " then
Dim objCDONTS ' Email object
Dim strSubject, strBody ' Message
Dim misccompo

Set objCDONTS = Server.CreateOb ject("CDONTS.Ne wMail")
objCDONTS.From = contactName & " <" & contactEmail & ">"
objCDONTS.To = "ma**@dcs-imago.com"
objCDONTS.Subje ct = "dcs"
objCDONTS.Body = "--------------------------------------" & vbcrlf & vbcrlf & contactMessage & vbcrlf & vbcrlf & vbcrlf &
"--------------------------------------------------------------" & vbcrlf & "MESSAGE ENDS: End of message"
objCDONTS.Send
Set objCDONTS = Nothing

response.redire ct "thanks.asp "
response.end
end if
%>
%>

Jul 19 '05 #2

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

Similar topics

2
4373
by: michaaal | last post by:
I have used both CDOs and CDONTS to send mail via ASP. To me they seem like they are the same thing, however, judging from other people's comments they are different. What are the differences?
1
1272
by: Gonzosez | last post by:
I keep getting permission denied error when I do objCDO.Send. I know that there is a permission that has to be set to allow this to happen but i don't remember. Help
7
2733
by: Harvey Waxman | last post by:
Can someone show me how to modify this simple code from CDONTS to CDO to bring it up to date? It works fine now and maybe I should leave it alone? <% Dim t1,instructions t1 = "Instructions" instructions = Request.Form("instructions") Dim ObjMail
1
1715
by: Simon Wigzell | last post by:
I'm generating HTML formatted emails in my asp program using CDONT. Depending on hoow ling the link is it will sometimes wrap and ruin the link. The is Detail email properties listing : ------=_NextPart_000_0314_01C418C2.90C5F130 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit At your request, we have created a webpage message for you: here...
1
2230
by: Simon Wigzell | last post by:
I send HTML formatted emails with links and images in them generated by my asp driven website. Occasionally the image will not appear and the link will not work. By looking at the email at the receive end, (right click/properties/details/message source, this is what I sent: <p align="center" style="margin-top: 0; margin-bottom: 0"><a href="http://www.mississippiprinting.com/MPCHomeOld.asp"> <img border="0"...
2
1587
by: Rajiv | last post by:
hi all , i have to send the mail to all the employees of the company , e-mail address is stored in a table . i m using cdont component to send the mail , what are the basic requirement of cdont how to install cdont on server 2000 and is it necessary that smtp server
11
3007
by: Simon Wigzell | last post by:
My website sends automatic emails from many (25) different places. I want to send a second email by reading the parameters of the first one. I don't want to have to repeat and maintain the assignment of the second email From,To,Subject fields so I am just using an include at each point in the code where I send an email: Set MyCDONTSMail = CreateObject("CDONTS.NewMail") MyCDONTSMail.BodyFormat= 0 MyCDONTSMail.MailFormat= 1...
1
2045
by: Simon Wigzell | last post by:
Is it possible to extract from a CDONT a value that has been added to it? e.g. can I say: MyCDONTSMail.From="some email address" MyCDONTSMail.To="some other email address" MyCDONTSMail.Subject="some subject" MyCDONTSMail.Body="some body" And then get those values later in the program e.g.:
1
1374
by: bijuvellur | last post by:
why the mail goes to bulk? when we use ASP code using CDONT mail object
2
1596
by: Nagstor | last post by:
Hi I have been facing a problem with greek characters in the mail being generated using CDONTS they are coming up as " ???????" is there a charset definition i can set to the body... (like cdosys has .htmlbodyPart.charset="iso-8599-7" etc) something similar?? I have tried using meta tage with charset defined in html start but it still doent seem to help
0
9642
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
10770
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
10481
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...
0
10199
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9312
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...
0
5616
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...
0
5779
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3956
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3074
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.