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

send mail from ASP-any ideas??

35
hi all,
im trying to send an email from my asp code,
im using the CDO object as follows

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "CDO Message"
objMessage.From = "an email address"
objMessage.To = "another email address"
objMessage.TextBody = "message body"
objMessage.Send

but my code wouldn't work
do i need to configure an SMTP server for this to work, change some firewall settings, use some more code ??!!!!!!!!

Please help me out im new to this :D
Jul 27 '06 #1
6 3537
Hi if ur server have CDONTS object then u can use this code for mail
set myMail=Server.CreateObject("CDONTS.NewMail")

myMail.To = "xxx@xx.com";"xxx@xx.com"
myMail.from = "xxx@xx.com"(This field Mandatory)
myMail.cc="xxx@xx.com"
myMail.Subject = "xxxxxxxxxxxxxxxxxxxxxx"
myMail.Body="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
myMail.BodyFormat=0
myMail.MailFormat=0
myMail.send
Jul 28 '06 #2
Hope

http://www.w3schools.com/asp/asp_send_email.asp

This will help you
Jul 28 '06 #3
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
objCDOSYSCon.Fields ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "127.0.0.1"
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objCDOSYSCon.Fields.Update

try using the configuartion object works fine after you created the object
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Jul 28 '06 #4
r_o
35
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
objCDOSYSCon.Fields ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "127.0.0.1"
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objCDOSYSCon.Fields.Update

try using the configuartion object works fine after you created the object
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Thanks man that really helped
it worked pretty fine
thanks a lot
Jul 29 '06 #5
r_o
35
Hope

http://www.w3schools.com/asp/asp_send_email.asp

This will help you
It really did
it seems i had to use the remote server's (my network mail server) ip address
thanks a lot
i appreciate it
Jul 29 '06 #6
r_o
35
Hi if ur server have CDONTS object then u can use this code for mail
set myMail=Server.CreateObject("CDONTS.NewMail")

myMail.To = "xxx@xx.com";"xxx@xx.com"
myMail.from = "xxx@xx.com"(This field Mandatory)
myMail.cc="xxx@xx.com"
myMail.Subject = "xxxxxxxxxxxxxxxxxxxxxx"
myMail.Body="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
myMail.BodyFormat=0
myMail.MailFormat=0
myMail.send

na CDONTS didnt work for me
i think CDO is a newer and better technology
i found the solution
thanks for your concern
Jul 29 '06 #7

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

Similar topics

11
by: Google Mike | last post by:
I've got RH9 Linux with default PHP. Is there a way to send email on Linux to an Exchange Server from PHP and/or other tools when there is *NOT* SMTP access? Has anyone figured out a way to...
5
by: RICHARD BROMBERG | last post by:
I am already using ASP/Cdonts to send the contents of a Form by e-mail and would like to include a link on my page to send the page itself by e-mail to a named recipient. Can anyone start me in...
6
by: Cameron Eckman | last post by:
I get various errors when I try to use email on the machine I have. XP professional. It works fine on another machine with NT 2000 server. Below is the code: 'BEGIN CODE Dim oMail As New...
1
by: Jens Øster | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send...
3
by: Jens | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send...
14
by: supz | last post by:
Hi, I use the standard code given below to send an email from an ASP.NET web form. The code executes fine but no Email is sent. All emails get queued in the Inetpub mail queue. I'm using my...
2
by: Cimento Cola | last post by:
Hello all. Hope anyone can help me! I have this form, with: Please choose your file: (browse) The main purpose is the user to select a local file and then when he submits a mail should be...
6
by: AbraAbraCadabra | last post by:
Here is the code I have been using to send mail... Set objCDO = Server.CreateObject("CDO.Message") With objCDO .To = strTo .From = "markus@domain.com" .Subject = "This is the...
3
by: YMPN | last post by:
Hi Everyone, I'm deen from Riyadh. Please do help me with some problem i have. I have this formview control setup to recieved inputs from user (textbox, dropdownlist, others). After...
3
by: Prasad | last post by:
Hi all, I had to write a page in ASP which sends an email. I googled and was able to write the following code: <html> <body> <% Set Mail = Server.CreateObject("CDONTS.NewMail") Mail.To =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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,...

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.