473,473 Members | 1,817 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How can i make this script work using CDOSYS?

I have the follwing code and cannot receive e mails sent from my contact
form. Please advise how can i make it work with CDOSYS. Thank you.

<%
form_from = "in**@nnn.com"
form_to = "in**@nnn.com"
form_cc = Request.Form("mail_cc")
form_bcc = Request.Form("mail_bcc")
form_subject = "Reality Form Submission"
form_importance = 1

FOR x = 1 TO Request.Form.Count
IF Request.Form.Key(x) = "mail_from" OR Request.Form.Key(x) = "mail_to" OR
Request.Form.Key(x) = "mail_cc" OR Request.Form.Key(x) = "mail_bcc" OR
Request.Form.Key(x) = "mail_subject" OR Request.Form.Key(x) =
"mail_importance" OR Request.Form.Key(x) = "mail_redirect" OR
Request.Form.Key(x) = "mail_send" OR Request.Form.Key(x) = "Submit" THEN
form_variables = form_variables
ELSE
form_variables = form_variables & Request.Form.Key(x) & ": " & vbcrlf &
Request.Form.Item(x) & vbcrlf & vbcrlf
END IF
NEXT

DIM body_text
body_text = vbcrlf & "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" & vbcrlf
body_text = body_text & form_subject & vbcrlf
body_text = body_text & "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" & vbcrlf
& vbcrlf
body_text = body_text & form_variables
body_text = body_text & "Sent from: " & vbcrlf &
Request.ServerVariables("HTTP_REFERER") & vbcrlf & vbcrlf
body_text = body_text & "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" & vbcrlf
<!--SET objMail = Server.CreateObject("CDONTS.NewMail")-->

SET objMail = CreateObject("CDO.Message")

<!--objMail.BodyFormat = 1-->
<!--objMail.MailFormat = 1-->

objMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2

objMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
="127.0.0.1"

objMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _
=25
objMail.Configuration.Fields.Update
objMail.From = form_from
objMail.To = form_to
objMail.CC = form_cc
objMail.BCC = form_bcc
objMail.Subject = form_subject
<!--objMail.Importance = form_importance-->
objMail.TextBody = body_text
objMail.Send
SET objMail = NOTHING

Response.Write("")
%>
Mar 22 '08 #1
0 1011

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

Similar topics

3
by: BB | last post by:
For send mail from a web page is there any benefit in using CDOSYS over CDONTS? Are the methods the same? How do you Set the object? Thanks BB
0
by: Luqman | last post by:
Is it possible to MailMerge using CDOSYS in ASP.Net ? Best Regards, Luqman
1
by: aRBee | last post by:
I got the all too typical Unable to access CDO.Message object error. I checked the registry for HKEY_CLASSES_ROOT\CDO.Message\CLSID and the default value was blank. I unregistered all CDO dlls:...
3
by: GJH | last post by:
I am hosting with Godaddy.com and they will not let me use the system.web.mail object that comes with asp.net. I can use CDOSYS. is there anyway to call cdosys email from within a asp.net webpage....
1
by: Mitch W | last post by:
I have an application that I have developed on Windows XP that references the Microsoft CDO for Windows 2000 and attempts to send a message using: CDO.Message cdoMsg = new CDO.Message(); It...
0
by: Atenza | last post by:
Hi all, I develop an VB6 program to send email by using CDOSYS.DLL. It works fine as follow: Dim iMsg As New CDO.Message Dim iDsrc As CDO.IDataSource Set iDsrc = iMsg ' (QueryInterface)...
1
by: jinimg | last post by:
How will use CDOSYS technology in sending email forms in asp
5
by: ozzii | last post by:
Hi, I have a asp email script which uses cdosys to send emails with attahcments by iterating through a record set of 500 email addresses. However the script simply times out. I know you can...
1
by: mukesh1989 | last post by:
using CDOSYS i am able to send mails only to Gmail but not to the other mails why? and also in Gmail mail it will be in Spam folder if i say it is not spam also! please help me. sometimes it takes...
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,...
1
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...
0
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,...
1
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
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.