How to send a GMail through IDEAScript
Brian Element
Forums
I found this post on the IDEA forums on how to use IDEAScript to send a gmail message. Thought it might be of use to someone.
Sub Main
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.From = "ideasupport@caseware.com"
objMessage.To = "oscar.salas@caseware.com"
objMessage.TextBody = "New"
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = "2"
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") = "true"
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "myemail@caseware.com"
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password1"
objMessage.Configuration.Fields.Update
objMessage.Send
Set objMessage = Nothing
End Sub
Being that this is over 5
Being that this is over 5 years old things could have changed. The latest version of IDEA 11.2 now handles gmail so if you haven't you should upgrade to the latest version when you can, the English is out, I am not sure when the other languages are being released but it should be soon and then you can use gmail.
Hi Brian, thank you very much
Hi Brian, thank you very much for sharing it.
I tried to run it (with my own email and password), but it fails and returns the error shown in the image: 0x80040217.
Do you have any suggestions?
Thanks in advance.
Eduardo