Solved

Problem using CDO  in VB.NET

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
fso.FolderExists("\\server\HiddenFolder$") 4 69
Exit the loop 4 43
SQL LINE CONTINUATION ISSUE 12 33
Adding Existing Item to vb.net Project causes Errors 4 33
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…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

831 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