Solved

Problem using CDO  in VB.NET

Posted on 2004-08-03
4
643 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

760 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

20 Experts available now in Live!

Get 1:1 Help Now