• Facebook
  • RSS Feed
  • Instagram
  • LinkedIn
  • Twitter
Nov 202009

I wrote the following simple script to send 1000 emails into Exchange, whereby the subject is sequentially numbered.

It’s quite handy for testing bulk operations, because you can see (if it fails) where it got to in processing the items.

You will only need some small (obvious) modification to run in your environment, and it uses CDO from VBScript (so needs to be run from a client with Outlook + CDO installed)

set objMessage = CreateObject("CDO.Message")
set objConfig = CreateObject("CDO.Configuration")

SET Flds = objConfig.Fields
    With Flds
        .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
        .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "exch1.ev.local"
    End With

set objMessage.COnfiguration = objConfig

' Do a big loop

for i = 1 to 1000
            wscript.echo "Processing : " & i
            objMessage.Subject = i
            objMessage.From = "ExternalPerson@External.com"
            objMessage.To = "YourTestUser@ev.local"
            objMessage.TextBody = "Hello"
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>