VBSTips

「VBSTips」の編集履歴(バックアップ)一覧はこちら

VBSTips」(2008/08/28 (木) 08:37:47) の最新版変更点

追加された行は緑色になります。

削除された行は赤色になります。

*&bold(){メール送信} ' 「cscript バッチファイル名」 で実行する。 ' 参考URL:http://www.atmarkit.co.jp/fwin2k/win2ktips/428wshmail/wshmail.html Set oMsg = CreateObject("CDO.Message") oMsg.From = "[送信元アドレス:xxx@xxx.xx.xx]" oMsg.To = "[宛先アドレス:xxx@xxx.xx.xx]" ' CC,BCCがある場合は、以下を設定してください。 'oMsg.cc = "xxx@xxx.xx.xx" 'oMsg.bcc = "xxx@xxx.xx.xx" oMsg.Subject = "[タイトル:バッチ送信テスト]" oMsg.TextBody = "[本文]" ' 例:"テストメッセージです" & vbCrLf & Now oMsg.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 oMsg.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "[smtpサーバ:smtp.xxx.xx.xx]" oMsg.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = [通信ポート:25] oMsg.Configuration.Fields.Update ' 添付ファイルがある場合は「oMsg.AddAttachment」の引数に指定してください。 ' 1回で添付できるのは1ファイルなので、複数ファイルある場合は、複数回実行してください。 'oMsg.AddAttachment "[添付ファイル名:x:\test.txt]" oMsg.Send
*&bold(){メール送信} ' 「cscript バッチファイル名」 で実行する。 ' 参考URL:http://www.atmarkit.co.jp/fwin2k/win2ktips/428wshmail/wshmail.html Set oMsg = CreateObject("CDO.Message") oMsg.From = "[送信元アドレス:xxx@xxx.xx.xx]" oMsg.To = "[宛先アドレス:xxx@xxx.xx.xx]" ' CC,BCCがある場合は、以下を設定してください。 'oMsg.cc = "xxx@xxx.xx.xx" 'oMsg.bcc = "xxx@xxx.xx.xx" oMsg.Subject = "[タイトル:バッチ送信テスト]" oMsg.TextBody = "[本文]" ' 例:"テストメッセージです" & vbCrLf & Now oMsg.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") _ = 2 oMsg.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ = "[smtpサーバ:smtp.xxx.xx.xx]" oMsg.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _ = [通信ポート:25] oMsg.Configuration.Fields.Update ' 添付ファイルがある場合は「oMsg.AddAttachment」の引数に指定してください。 ' 1回で添付できるのは1ファイルなので、複数ファイルある場合は、複数回実行してください。 'oMsg.AddAttachment "[添付ファイル名:x:\test.txt]" oMsg.Send

表示オプション

横に並べて表示:
変化行の前後のみ表示: