473,509 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Send mail using CDO.Message and CDO.Configuration, anyone succeeded?

Hi all

As I subscribe MSDN I got an USB-memory with Microsoft eLearing library.

I found an exampell how to send SMTP e-mail using CDO.Message object and
CDO.Configuration.

But when I try to send it, it answers, "The transport failed to connect
to server". I suppose that means the SMTP-server. Since I used that
SMTP-server several times when I send e-mail, I can't figure out why I
doesn't work. Has anyone succeeded to run the mail-example?

Note: I don't use user/password, so I changed Authenticate to cdoAnonymous.

Regards

Henrik Bergman

Dim MyMessage As New CDO.Message()
Dim Config As New CDO.Configuration()

' Specify the configuration.
Config.Fields(cdoSendUsingMethod) = cdoSendUsingPort
Config.Fields(cdoSMTPServer) = "test.mailserver.com"
Config.Fields(cdoSMTPServerPort) = 25
Config.Fields(cdoSMTPAuthenticate) = cdoBasic
Config.Fields(cdoSendUserName) = "username"
Config.Fields(cdoSendPassword) = "password"

' Update the configuration.
Config.Fields.Update()
MyMessage.Configuration = Config

' Create the message.
MyMessage.To = "so*****@somewhere.com"
MyMessage.From = "me@somewhere.com"
MyMessage.Subject = "Hello"
MyMessage.TextBody = "This is the message!"

' Send the CDOSYS Message
MyMessage.Send()
--
__________________________________________
Henrik Bergman, X-OBI, mob 070-866 87 72
e-mail: he************@x-obi.com

Jul 21 '05 #1
0 1413

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

Similar topics

8
18514
by: Samia | last post by:
I have an application running on a single workstation (win 2000) with Outlook installed and a profile create using and exchange server with authentification through the DNS. This user profile is...
2
9591
by: Ronny Sigo | last post by:
Hello all, I a struggling for a few days now to find a way to send automated mail. I succeeded except that MS Outlook always gives me those 2 stupid warnings that 1) a "program tries to get...
2
2331
by: Ron | last post by:
hi guys, I am trying to send email using smtpMail. I can send emails inside the organization, but out of the organization I get an error "The server rejected one or more recipient addresses. The...
3
3007
by: RN | last post by:
I am tired of sending mail from the built-in SMTP service for so many reasons (errors are nondescriptive in the event log, it doesn't let me control which IP address it sends from, and it...
0
1213
by: Henrik Bergman | last post by:
Hi all As I subscribe MSDN I got an USB-memory with Microsoft eLearing library. I found an exampell how to send SMTP e-mail using CDO.Message object and CDO.Configuration. MSDN has also got...
0
363
by: Henrik Bergman | last post by:
Hi all As I subscribe MSDN I got an USB-memory with Microsoft eLearing library. I found an exampell how to send SMTP e-mail using CDO.Message object and CDO.Configuration. But when I try to...
1
2276
by: chaitanya02 | last post by:
Hi All, Well- this question might have appeared several times on this forum- but would appreciate your reply on this: I have a asp page, where customers login with some username and the pwd,...
1
6818
by: maxxxxel | last post by:
Hi Can anyone help me with some asp code , I changed the code to use CDO.message instead of the old cdont.sys to send mail from a ASP webpage which works fine. Our problem is that when we send...
3
3443
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
7233
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
7342
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
7067
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
7505
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...
0
5650
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
5060
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
4729
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...
0
1570
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
440
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...

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.