473,769 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem with CDOSYS Send mail

4 New Member
I have read the forum regarding how to send email using CDOSYS...
I have try to use the code given but still can't make it
what should i do with the smtpserver and smtpserverport?
please help thanks

Set myMail=CreateOb ject("CDO.Messa ge")
myMail.Subject= "Sending email with CDO"
myMail.From="my mail@mydomain.c om"
myMail.To="myma il@hotmail.com"
myMail.TextBody ="This is a message."
myMail.Configur ation.Fields.It em ("http://schemas.microso ft.com/cdo/configuration/smtpserver") = "127.0.0.1"
myMail.Configur ation.Fields.It em ("http://schemas.microso ft.com/cdo/configuration/smtpserverport" ) = 25
myMail.Configur ation.Fields.It em ("http://schemas.microso ft.com/cdo/configuration/sendusing") = 2
myMail.Configur ation.Fields.Up date
myMail.Send
set myMail=nothing
Aug 30 '06 #1
3 3146
sashi
1,754 Recognized Expert Top Contributor
Hi there,

Leave SMTPSERVER, SMPTSERVERPORT as is it, the value used in the above code segment is the default value for most MAIL servers. Only change those values unless you are running your own mail server. Probably, try changing the MAIL server name instead, because MAIL server name varies for every domain.
Aug 31 '06 #2
teju
34 New Member
try using the below code
Dim objCDOSYSCon,ob jCDOSYSMail
Set objCDOSYSMail = Server.CreateOb ject("CDO.Messa ge")
Set objCDOSYSCon = Server.CreateOb ject ("CDO.Configura tion")
objCDOSYSCon.Fi elds("http://schemas.microso ft.com/cdo/configuration/smtpserver") = "127.0.0.1"
objCDOSYSCon.Fi elds("http://schemas.microso ft.com/cdo/configuration/smtpserverport" ) = 25
objCDOSYSCon.Fi elds("http://schemas.microso ft.com/cdo/configuration/sendusing") = 2
objCDOSYSCon.Fi elds.Update

'Update the CDOSYS Configuration
Set objCDOSYSMail.C onfiguration = objCDOSYSCon
objCDOSYSMail.F rom = xx@dd.com
objCDOSYSMail.T o = xx@dd.com
objCDOSYSMail.S end
Sep 1 '06 #3
skinymike
4 New Member
Thanks guys, anyway i dint have my own smtp server. just wonder is there any free smtp server on the web so i can use this code and try it out. Thanks
Sep 3 '06 #4

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

Similar topics

3
5874
by: Serge Myrand | last post by:
Hi everybody, The following code for sending email (found on msn I think) works find when used in a .VBS file. I double click the file and the mail is send. When I use the same code in my .ASP application I get the following message: "The pickup directory path is required and was not specified" Where to specify that directory?
14
13433
by: Neil Ginsberg | last post by:
I am using VBA/Access to send SMTP mail using CDO. I set a reference to "Microsoft CDO for Windows 2000 Library" (cdosys.dll). Everything works fine, both on my PC and on another PC. However, on another PC that the database was installed on, the user is getting the message, "The project contains a missing or broken reference to the file 'CDO.DLL' version 1.21." However, I don't have a reference to cdo.dll; my reference is to cdosys.dll....
0
1222
by: martin | last post by:
Hi, I have been using the system.web.mail namespace to send mail in my application and every thing has been working fine. however to today I an unable to send mail from my machine using the methods from this namespace in the usual manner. The error that I get from .net is
0
1420
by: alina | last post by:
I'm using CDOSYS to send an e-mail with both text and html included in the e-mail I'm using the following code to send the e-mail to an SMTP server.If I open the e-mail with Outlook Express 6 is working fine.If the text only option is enabled I get only the text part of the e-mail.If I open this e-mail with Outlook 2003 I get the text rendered from the html which is looking very ugly.I've tried to use another code as well, using bodyparts and I...
6
279
by: Evan Kontos | last post by:
I have an app that sends SMTP email that is written in VB.Net. When I try to run it on a 98 machine w/.net framework installed on it the app crashes as soon as it starts to run. Any suggestions?
24
6275
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 can't figure out how to embed an image. Thanks for your time. -- Manuel
8
7549
by: Akbur | last post by:
Dear all, I'm having major issues sending an email from my ASP.NET app. I'm getting a "Could not create 'CDO.Message' object". When I did a search for cdosys.dll in \win_location\system32, I could not find it. So I copied it from another Windows 2003 server, where it did exist. Another dependant file was missing too (inetcomm.dll).
2
5371
by: mister-Ed | last post by:
Trying to use cdosys mail, but this is giving me an "no such object" error. the hosting company is not much help, but their list of components offered does include cdosys mail: <form method="post" action="cdosys-godaddy.asp"><p class="bodymd- wh">Your Name: <input type="text" name="uname" id="uname"> <br>City: <input type="text" name="city" id="city"> <br>State:
1
1380
by: worldofrugs | last post by:
I'm hosted on a shared server with Godaddy.com... I have several forms on my website that all use the same ASP file to send out my forms.. It worked fine for a long time, but now the forms send to my e-mail arrive after a few hours instead of instantly. Calling Godaddy did not help as they stated all is working fine (no delays) on their end and refuse to help with custom scripts.. My emails are also hosted by godaddy like my website. ...
6
6519
by: ayush patel | last post by:
Hi everybody, I wrote a windows service and I have to do sme email functionality in it. I used SMTP and added system.web reference to the project. there are no compilation errors as such but there is a run time error saying System.Web.HttpException: Could not create an object of type 'CDO.Message'. Please verify that the current platform configuration supports SMTP mail. at...
0
10212
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...
1
9995
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9863
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
8872
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...
1
7410
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5304
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...
1
3962
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 we have to send another system
2
3563
muto222
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.