Solved

Problem using CDO  in VB.NET

Posted on 2004-08-03
4
644 Views
Last Modified: 2011-10-03
Hi all,

Iam using CDO with VB.net to send user Login information(username and Password).

Iam using the following code to send the e-mail.


 Dim objMsg As New CDO.Message()
             Dim conf As New CDO.Configuration()
           Const cdoSendUsingPort = 2
            Dim Flds = conf.Fields

            With Flds
             .item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
            .item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "MailServer"
            .item("http://schemas.microsoft.com/cdo/configuration/smtpauthencation") = 0
            .item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 15
            .item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
            .update()
            End With

            Flds("urn:schemas:httpmail:importance").value = 2

             With objMsg
             .Configuration = conf
            .From = "me@xxx.com"
             .To = "you@xx.com"
            .Subject = "Web Timecard Login information"
            .HTMLBody = " Here is the HTML body text message"
            .Send()
            End With

            objMsg = Nothing
            conf = Nothing
            Flds = Nothing
  When I first run the program, it was sent the mail sucessfully. It tool around 15 to 20 Minutes to receive the e-mail. Then i have tested several times. Later i didn't get any mail. But i can see the application run successfully.
I got one error message, saying that.

    Error Message: Your E-mail message was unable to send because your mail server rejects the sender. 451 timeout waiting for client input.



Do i need to setup something in the mail server to accept SMTP mail messages?. we are using Outlook e-mails.


Can anyone please tell me how can I solve this issue.


Thanks in advance..

Regards,
Raju.
0
Comment
Question by:kbraju76
  • 2
4 Comments
 
LVL 10

Expert Comment

by:Clif
ID: 11706465
Just a thought...

Some mail servers have a mass mailing filter which prevents muliple identical emails from being sent through.  I was having a similar problem myself, until I changes my test email slightly for each test.
0
 
LVL 8

Expert Comment

by:rfgkev
ID: 11706571
/agree with Clif

Also, is the Sender address a 'Real' address? it could be that the mail server is trying to do a reverse DNS lookup on the sender address and not finding it. Doesn't sound like this as it sent the first time thou, unless you changed the sender address ofcourse :)

Try setting up the SMTP service on your machine and sending them through that.
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 11707276
0
 
LVL 17

Accepted Solution

by:
AerosSaga earned 500 total points
ID: 11707314
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now