473,670 Members | 2,551 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Send mail using CDO.Message and CDO.Configurati on, 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.Configurati on.

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.Configurati on()

' Specify the configuration.
Config.Fields(c doSendUsingMeth od) = cdoSendUsingPor t
Config.Fields(c doSMTPServer) = "test.mailserve r.com"
Config.Fields(c doSMTPServerPor t) = 25
Config.Fields(c doSMTPAuthentic ate) = cdoBasic
Config.Fields(c doSendUserName) = "username"
Config.Fields(c doSendPassword) = "password"

' Update the configuration.
Config.Fields.U pdate()
MyMessage.Confi guration = Config

' Create the message.
MyMessage.To = "so*****@somewh ere.com"
MyMessage.From = "me@somewhere.c om"
MyMessage.Subje ct = "Hello"
MyMessage.TextB ody = "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 1432

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

Similar topics

8
18523
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 the only one using the app. I want the app to send email using the profile's email adress. Here is what I am doing : Dim mail As New MailMessage()
2
9598
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 access to the emailadresses in the contactlist - and wether I want to allow this" and 2) That a program is trying to send emails on my behalf - and wether I want to allow this. ... I have tried to use the redemption package but obviously I do not...
2
2334
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 server response was: 550 5.7.1 Unable to relay for ........" now I tried to add username and password for the server to relay but it is still not working. this is the example i used:
3
3025
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 identifies itself as the computer name which is not in domain.com format, triggering spam filter problems). Instead, I want to have my code send through an SMTP server of a company that we pay for mail service. But they require a username and password....
0
1216
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 a simular example, but it didn't work for me. But when I try to send it, it answers, "The transport failed to connect
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 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
1
2282
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, which are stored in sql. i should be using this user name and pwd and check if it is the same as the userid and the pwd in the sql 4 table..IF so then: display the download url which is in sql3 by querying the four tables.. These four tables are...
1
6839
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 mail externally to a internet email site like Gmail the PDF is sent but is corrupted because CDOSYS ends up using binary encoding rather than Base64 encoding when creating the attachment. More information here: Anthonys Code My knowledge of ASP...
3
3456
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 = "XXXXXXXXXXXX@XXXXXX.COM"
0
8466
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8384
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8901
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...
0
8813
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6212
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
4208
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...
0
4388
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2799
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
2037
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.