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

Anyone succeeded to send SMTP-mail using CDO.Message and CDO.Configuration?

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 a simular example, but it didn't work for me.

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?

MSDN has also got a simular example, but it didn't work for me.

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()

Nov 21 '05 #1
0 1203

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

Similar topics

1
by: jason | last post by:
Could someone point me to some specificic code which illustrates how to leveraget the feature of CDO.....I have looked at www.aspfaq.com but there does not seem to be a SPECIFIC code example on...
3
by: billg_sd | last post by:
My client app uses SmtpMail.Send() is failing on client PC's that are configured with Outlook 2003. I'm using code similar to: Dim Message As System.Web.Mail.MailMessage = New...
2
by: pcserver | last post by:
I would like to ask which class should i use for getting my PC's gateway ip and can send an email to smtp?thanks I am going to write a program that will check my pc gateway regularly, and send...
4
by: CLEAR-RCIC | last post by:
I want to send an email from our Intranet site to myself whenever an error happens. Our manager will not let us install SMTP on the web server. Is it possible to send email programatically...
9
by: Peter | last post by:
I have created a small windows app that gathers some user entered data, then prints it to a designated printer. A specific person then collects the prints from the printer and processes the info...
10
by: Mike Charney | last post by:
Is there a simple way to send SMTP email from Access VBA? Mike m charney at dunlap hospital dot org
5
by: amjad | last post by:
hi how to send email through groupwise not smtp with asp.net 1.1 lang=c sharp.. thanks
1
by: oliu321 | last post by:
Hi, I am trying to write some codes to send emails through a SMTP server. I wrote a C++ version using pure socket programming and SMTP protocol, a VB version using CDO and a C# version using...
1
by: Admir Saric | last post by:
Hi, i have created an application in pygtk. The application creates files with its own file type and extensions and saves them. I would like to extend the application to be able to send these...
16
by: bgreer5050 | last post by:
I have a form with the following fields: UserEmail Subject Body When the form is submitted, the email is processed fine. When I try to add another field to the mm.body (mm.Body = Body.Text...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
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
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,...

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.