Things I Learned Today

All Things Enterprise Vault with a sprinkling of everything else

Menu
  • About Me
  • EV Videos
  • Windows Videos
  • Other Videos
Menu

Getting test data

Posted on November 20, 2009 by Rob Wilcox

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"
        .Update
    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"
            objMessage.Send
            wscript.sleep(1000)
next
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 Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Have a look at more of my instagrams

Follow on Instagram
  • Facebook
  • RSS Feed
  • Instagram
  • LinkedIn
  • Twitter
© 2019 Things I Learned Today | WordPress Theme by Superb WordPress Themes