メールの本文にlogファイルの文章を読み込ませたいです。
下記の内容でGmailを送るとしたら、ml.TextBodyにlogファイルの内容を読み込ませるとしたらどのようにコードを打てば可能になるでしょうか?
教えてください、お願いします。
VBS
1Option Explicit 2On Error Resume Next 3Dim ml,strConfigurationField 4Set ml = CreateObject("CDO.Message") 5ml.From = "aa@gmail.com" 6ml.To = "bb@gmail.com" 7ml.Subject = "件名:メール送信テスト" 8ml.TextBody = "" 9strConfigurationField ="http://schemas.microsoft.com/cdo/configuration/" 10With ml.Configuration.Fields 11.Item(strConfigurationField & "sendusing") = 2 12.Item(strConfigurationField & "smtpserver") = "smtp.googlemail.com" 13.Item(strConfigurationField & "smtpserverport") = 465 14.Item(strConfigurationField & "smtpusessl") = true 15.Item(strConfigurationField & "smtpauthenticate") = 1 16.Item(strConfigurationField & "sendusername") = "aa@gmail.com" 17.Item(strConfigurationField & "sendpassword") = "XX" 18.Item(strConfigurationField & "smtpconnectiontimeout") = 60 19.Update 20End With 21ml.TextBodyPart.Charset = "ISO-2022-JP" 22ml.Send
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。