473,770 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trouble in sending emails using CDO

Hi,

I am using CDO component to send emails through my ASP page as I am
having IIS on windows XP..........
Now the mails goes and gets into mailroot\Queue folder but does not
reaches to the destination.... ....
Pls tell me what do I need to do.........

here goes my code for your reference.....

Const cdoSendUsingPic kup = 1
Const cdoSendUsingPor t = 2
Const cdoSendUsingExc hange = 3

Const cdoAnonymous = 0
Const cdoBasic = 1
Const cdoNTLM = 2

'Sends an email To aTo email address, with Subject And TextBody.
'The email is In text format.
'Lets you specify BCC adresses, Attachments, smtp server And Sender
email address
Function SendMailByCDO(a To, Subject, TextBody, smtp, aFrom )
on error resume Next

Dim Message 'As New CDO.Message '(New - For VBA)

'Create CDO message object
Set Message = CreateObject("C DO.Message")

'Set configuration fields.
With Message.Configu ration.Fields 'Original sender email address

..Item("http://schemas.microso ft.com/cdo/configuration/sendemailaddres s")
= aFrom

' SMTP settings - without authentication, using standard port 25 on
host smtp
.Item("http://schemas.microso ft.com/cdo/configuration/sendusing ")
= cdoSendUsingPor t

..Item("http://schemas.microso ft.com/cdo/configuration/smtpserverport" )
= 25
.Item(" http://schemas.microso ft.com/cdo/configuration/smtpserver")
= smtp

'SMTP Authentication

..Item("http://schemas.microso ft.com/cdo/configuration/smtpauthenticat e
") = cdoAnonymous

.Update
End With

'Set other message fields.
With Message
'From, To, Subject And Body are required.
.From = aFrom
.To = aTo
.Subject = Subject

'Set TextBody property If you want To send the email As plain text
.HTMLBody = TextBody

'Set HTMLBody property If you want To send the email As an HTML
formatted
'.HTMLBody = TextBody

'Blind copy And attachments are optional.
If Len(BCC)>0 Then .BCC = BCC
If Len(Files)>0 Then .AddAttachment Files

'Send the email
.Send
End With

'Returns zero If succesfull. Error code otherwise
SendMailByCDO = Err.Number
End Function

Function SendMail()
Const smtp = "20.139.68. 2"
Const aFrom = "ma**@mail. com"
aTo="ar******** *@gmail.com"
Subject="Foo"
TextBody="fsdfs dfsd"

call SendMailByCDO(a To, Subject, TextBody, smtp, aFrom )
End Function

call SendMail()

Regards,
Amit Arora

May 18 '06 #1
4 3751
On 18 May 2006 08:20:28 -0700, ar*********@gma il.com wrote:
Hi,

I am using CDO component to send emails through my ASP page as I am
having IIS on windows XP..........
Now the mails goes and gets into mailroot\Queue folder but does not
reaches to the destination.... ....


Start with:

http://www.aspfaq.com/show.asp?id=2268

Jeff
May 19 '06 #2
Well Buddy,
This link jumped me to problem shotting for Windows 2000, though I
tested it on my windows XP server and found the same result i.e getting
into Queue folder....

Thanks
Amit Arora

Jeff Cochran wrote:
On 18 May 2006 08:20:28 -0700, ar*********@gma il.com wrote:
Hi,

I am using CDO component to send emails through my ASP page as I am
having IIS on windows XP..........
Now the mails goes and gets into mailroot\Queue folder but does not
reaches to the destination.... ....


Start with:

http://www.aspfaq.com/show.asp?id=2268

Jeff


May 19 '06 #3
On 18 May 2006 22:09:51 -0700, ar*********@gma il.com wrote:
Well Buddy,
This link jumped me to problem shotting for Windows 2000, though I
tested it on my windows XP server and found the same result i.e getting
into Queue folder....
So, did you fix the problem? Did you look at the logs? Does anything
get delivered? Is your DNS correct? Have you tested the SMTP
manually? Checked the firewall?

Jeff

Thanks
Amit Arora

Jeff Cochran wrote:
On 18 May 2006 08:20:28 -0700, ar*********@gma il.com wrote:
>Hi,
>
>I am using CDO component to send emails through my ASP page as I am
>having IIS on windows XP..........
>Now the mails goes and gets into mailroot\Queue folder but does not
>reaches to the destination.... ....


Start with:

http://www.aspfaq.com/show.asp?id=2268

Jeff


May 20 '06 #4

Jeff Cochran wrote:
On 18 May 2006 22:09:51 -0700, ar*********@gma il.com wrote:
Well Buddy,
This link jumped me to problem shotting for Windows 2000, though I
tested it on my windows XP server and found the same result i.e getting
into Queue folder....


So, did you fix the problem? Did you look at the logs? Does anything
get delivered? Is your DNS correct? Have you tested the SMTP
manually? Checked the firewall?

Jeff

Thanks
Amit Arora

Jeff Cochran wrote:
On 18 May 2006 08:20:28 -0700, ar*********@gma il.com wrote:

>Hi,
>
>I am using CDO component to send emails through my ASP page as I am
>having IIS on windows XP..........
>Now the mails goes and gets into mailroot\Queue folder but does not
>reaches to the destination.... ....

Start with:

http://www.aspfaq.com/show.asp?id=2268

Jeff

I dunno but you're using 'anonymous' authentication (i.e. no
authentication) , maybe the server is not processing them because of
that? Change it to basic and supply a username/password to
authenticate (a valid username/password defined in the email server),
which also should be the same one in the 'from' field to reduce
potential problems (like relaying forbidden and stuff)

May 22 '06 #5

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

Similar topics

10
4987
by: Stuart Mueller | last post by:
I have an exchange server, that I sometimes use to perform mail shots to clients on our database, these can be upwards of 1000 at a time. As we don't want different clients to see who we are working with we put these mailshots in the bcc field of the mails. This can sometimes cause a problem as we are getting alot of mails bounced back. I would like to write a script to have these emails sent out individually using the to: field of the...
1
5150
by: Ian Taylor | last post by:
Hi all... Is it possible to send RTF-formatted emails using the .NET SmtpMail implementation? I can only find provision in the BodyFormat property of the message to send plain text or HTML emails. I also have a similar problem in sending HTML/RTF emails via MAPI and would appreciate any help anyone could give me in these areas.
3
2227
by: VB Programmer | last post by:
My company has it's own webserver, which is going to host our ASP.NET web application. We want the website to be able to send out emails. 1. What do I need on the server so that it has the abillity to send out emails? It is a Windows 2000 Professional SP3 server. 2. Any examples (code, etc...) on how to send out emails via an ASP.NET webform? Thanks!
2
9242
by: Mr. x | last post by:
Hello, I am sending emails with Hebrew contents. When receiving emails - I cannot see the Hebrew characters (it is not outlook express configuration, because when receiving emails from friends - I see hebrew, it is just sending by myself using *.aspx scripts). In web.config I have the following : <configuration> <system.web>
3
1593
by: A | last post by:
Hi all! I would like to ask a question on sending emails... I have a web application that requires sending emails using email templates. The templates that I've made are separate HTML files and would require some data based on what the user has entered. Please help!!!
3
3620
by: Ant | last post by:
Hi, I'm using the MailMessage & smtpMail classes in System.Web.Mail to send mail, however it's not sending any emails. I'm using it on a Windows 2003 server. The simplest way to use this is smtpMail.Send("from@here.com", to@there.com, "Message subject", "Message Body") I'm sending it to my own email address on a different server using a dummy
5
2448
by: Jai | last post by:
Hi, I am in a problem of sending mass emails(newsletter) to my website members. Actually my problem is this: I want to send newsletter to my website members. But I had given a facility for each member to choose different category of products or all products newsletter.
27
2018
by: stonemcstone | last post by:
I've been programming in C for years, and never experienced troubles until I started using the new RealC-32, a freeware C compiler from the same company that makes RealPlayer and Quicktime. That's when the trouble started. See, RealC-32 is like any other C compiler but with one notable difference. Any time your code invokes undefined behavior-- for example by dereferencing an uninitialized pointer-- rather than the usual segmentation...
0
1780
by: damimkader | last post by:
Hi, I'm trying to send emails using a Macro based on an Excel Sheet and the Email Client I'm using is Lotus Notes. OS used - Windows Xp. Language - VB Below is the Code I'm using for doing the same. Dim Maildb As Object
0
9453
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
10099
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...
0
9904
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...
1
7451
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
6710
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
5354
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
5481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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
3
2849
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.