Created
June 19, 2013 07:00
-
-
Save utahta/5812181 to your computer and use it in GitHub Desktop.
VBSメール送信
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Set objMail = CreateObject("CDO.Message") | |
| objMail.From = "hoge@gmail.com" | |
| objMail.To = "foo@gmail.com" | |
| objMail.Subject = "テスト" | |
| objMail.TextBody = "本文" | |
| strConfigurationField ="http://schemas.microsoft.com/cdo/configuration/" | |
| With objMail.Configuration.Fields | |
| .Item(strConfigurationField & "sendusing") = 2 | |
| .Item(strConfigurationField & "smtpserver") = "smtp.googlemail.com" | |
| .Item(strConfigurationField & "smtpserverport") = 465 | |
| .Item(strConfigurationField & "smtpusessl") = True | |
| .Item(strConfigurationField & "smtpauthenticate") = 1 | |
| .Item(strConfigurationField & "sendusername") = "hogehoge@gmail.com" | |
| .Item(strConfigurationField & "sendpassword") = "password" | |
| .Item(strConfigurationField & "smtpconnectiontimeout") = 60 | |
| .Update | |
| end With | |
| objMail.Send | |
| Set objMail = Nothing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment