We help IT Professionals succeed at work.

CDO newsletter using localhost

tomandrews asked
Last Modified: 2008-03-06
I am sure this is a stupid question but here goes.

I have been ticked off by my Hosting company for sending out a newsletter using CDO & ASP to 25k people a month. it has been annoyingly hard to find an alternatiove so I thought about doing it on my local machine using localhost (I am running XP pro) the script takes the addresses form a MYSQL database at the hosting company but sends them from my machine. This unexpectidle worked fine but I am unsure on how the mails are being sent. is it usnig my ISPs SMTP server? What is the downsides of doing this?

Any help appreciated.

Watch Question

Unless you specified otherwise the cdo object will use your local server as the smtp server. Here's an example of how I've changed the smtp server:

Function SendEmail(EmailBody, EmailTo, EmailFrom, EmailSubject, EmailBcc)
      Dim iMsg
      Dim iConf
      Dim Flds

      set iMsg = CreateObject("CDO.Message")
      set iConf = CreateObject("CDO.Configuration")
      Set Flds = iConf.Fields

      With Flds
            .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
            .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")  = "smtp.uc.edu"
            .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
            .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
      End With

      ' apply settings to the message
      With iMsg
            Set .Configuration = iConf

            .To = EmailTo
            .Bcc = emailBcc
            .From = emailFrom
            .Subject = emailSubject
            .HTMLBody = emailBody
      End With

      ' cleanup of variables
      Set iMsg = Nothing
      Set iConf = Nothing
      Set Flds = Nothing
End Function


Thanks very much.

I did not realise i had a local SMTP server!

Is that part of XP?

Is there any downside to doing this instead of using a web hosts smtp server?

yes you could be shut down by your ISP, ALMOST ALL ISP's FROWN upon mass mailing, all its going to take is a few people to complain to your ISP and whammo you are done.

Also how many are you sending at a time... some isp's restrict you to 50 or so at a time.


also since it is your own SMTP server, some recipient emails will deny your request because its not coming from a validated SMTP server...


Thanks for the advice. i am sending 25,000 in batches of 10 every 10 seconds. My ISP seems to allow mailing lists so long as they are opt-in and have a clear opt out on the newsletter. guess i will see how i go. how do you validate your SMTP server?
This one is on us!
(Get your first solution completely free - no credit card required)


thanks so much for you help.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.