Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Intermittent email problems

Intermittent email problems

Intermittent email problems

My application allows users to send emails. Before anyone thinks it's a spamming application, it's not. This email functionality allows transportation directors to notify students about delays with their school bus routes. Because of this, there are times when many emails get sent simultaneously.

Basically, the code is this:


Set objCDOSysMail = CreateObject("CDO.Message")
    Set objCDOSysCon = CreateObject("CDO.Configuration")
    With objCDOSysCon
        .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = oEmail.Configuration.SMTPServer
        .Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = oEmail.Configuration.RequiresAuthentication
        .Fields("http://schemas.microsoft.com/cdo/configuration/enablessl") = oEmail.Configuration.UseSSL
        .Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = oEmail.Configuration.Username
        .Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = oEmail.Configuration.Password
        .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = oEmail.Configuration.Port
        .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
        .Fields("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = oEmail.Configuration.UseSSL
        .Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
    End With
    Set objCDOSysMail.Configuration = objCDOSysCon

    With objCDOSysMail
		.From = oEmail.Configuration.From
		.To = Addresses(i)
		.Subject = oEmail.Subject
		'.BCC = Cc
		.HTMLBody = oEmail.Text
    End With
    Set objCDOSysMail = Nothing
    Set objCDOSysCon = Nothing 

Originally, email was configured to use my customers email server. When configured this way, the customer would occasionally get errors, such as:

Unable to send email. The server rejected one or more recipient addresses. The server response was: 501 5.1.3 Invalid address


The transport failed to connect to the server

According to the customer repeated attempts to send the email allows it to work.

I explained to the customer that the problem is probably caused by their email server and that there's nothing I can do to help resolve the problem. They insisted that the problem is mine and that I need to fix it.

I then suggested that they get a free gmail account and use that for their emails. They did this and all was well until today when they got an error regarding sending limits.

Finally, my question:

Using this method, is there a way to test connectivity to the mail server without actually sending an email?

Microsoft SQL Server MVP
My Blogs
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom

RE: Intermittent email problems

The email system in total is never 100% guaranteed.
Haven't you ever had someone say to you "didn't you get my email I sent you?"
Maybe you need some sort of confirmation of reception. This shouldn't be too hard with reporting to you only of emails that don't get read and replied to within a reasonable time then send again?
Can you include a "please confirm you have received it" thing so you know whether they got it?

What gmail limit would you be exceeding?
I believe you can increase the gmail limits using the Google Drive thingy but not sure how to with code.
Maybe you have to clear a record of old sent emails every week?

To test, open up a new different yahoo mail account in your computer and send a whole lot of emails to yourself to test.(spam yourself)

I use Yahoo mail to send without any problems and use EaSendmailobj.dll with minimum code.
There doesn't seem to be any limit on incoming Yahoo email. One very old Yahoo.com account I opened 10 years ago and discarded is still functioning with over 100000 spam emails still there unread. I can't find any reasonable way of clearing them other than 25 at a time!

RE: Intermittent email problems

Google limits free email accounts to 500 sent emails per day. There is no practical limit to the number of incoming emails (other than the 15 or so GB of storage space you are allowed).

The problem here is that there can be up to 3 emails per bus rider (2 parents and the child themselves). So, each bus could easily generate 150 emails. Sending emails to more than a small handful of buses and you're suddenly at your 500 email limit.

I suppose what I'm really looking for is a way to show the customer that the email problem is really with their mail server and not with the way that I am sending emails.

Of course, I am open to the suggestion that the way I am sending emails is the problem, which is why I posted the code that I am using.

Microsoft SQL Server MVP
My Blogs
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom

RE: Intermittent email problems

GMail normally have a 25mb daily limit on sending. Is it this limit being exceeded? If so you can extend to 5gb with Google drive (see their readme)

Also maybe you are sometimes sending too many CCs at a time for these free emails to handle? Some of them may get lost.

Can't you test your sender system by just opening up a another Yahoo or gmail account with another name and send to say 5000 single emails every 10 seconds? Then trying various numbers of CCs in an email (if you can send multiple CCs to yourself).

You can use the same dll to receive them and count them to save time.

With some regular paid services you can send to yourself but I notice you cant send to yourself sending and receiving on the free GMail or Yahoo.

The mind boggles that students on a bus would be using their phones or even have them on on the bus to school let alone own a mobile phone!
The average student has lost the ability to speak in a coherent human language now - you don't want to encourage them further!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close