Skip to content

Instantly share code, notes, and snippets.

@pmachapman
Created April 16, 2015 03:48
Show Gist options
  • Save pmachapman/7b091dffbae3de260602 to your computer and use it in GitHub Desktop.
Save pmachapman/7b091dffbae3de260602 to your computer and use it in GitHub Desktop.
Gmail SGML Character Test Script
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "SGML Test Message"
objMessage.From = "yourname@gmail.com"
objMessage.To = "yourname@gmail.com"
objMessage.HTMLBody = "<h1>This is an SGML test.</h1><p>You should not see: &nbsp</p>"
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 ' cdoSendUsingPort
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "yourname@gmail.com"
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
objMessage.Configuration.Fields.Update
objMessage.Send
Set objMessage = Nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment