0
vbscriptを作成して、添付ファイルを含む電子メールを別の電子メールに送信しようとしました。しかし、ウィンドウcmdでスクリプトを実行しようとすると、「サーバーが送信者を拒否しました。サーバー応答が530 5.7.0でしたSTARTLSを発行する必要があります」vbscriptで電子メールを送信するためのSTARTTLSエラーを発行する必要があります
ポートを465またはGoogle SMTPポート/暗号化の場合は587しかし、それはまた、以下
を働いていない私のVBScriptです:
Set email = CreateObject("CDO.Message")
email.Subject = "Test Email"
email.From = "[email protected]"
email.To = "[email protected]"
email.TextBody = "Message Text."
email.AddAttachment "C:\Users\fuckYou\Desktop\Handover\v.txt"
email.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
email.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
email.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
email.Fields("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = true
email.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "username"
email.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
email.Configuration.Fields.Update
email.Send
set email = Nothing
私は不足している部分を挿入した後、私はメッセージを取得し、エラーメッセージは私にトランスポートがサーバーに接続するのに失敗したことを示します –
私のウィンドウでこのコマンドを実行すると、18行目にemail.send構文の問題があります。このテストスクリプトはローカルPCで実行中です –
回答を編集。 googleからの電子メールのリンクをクリックしてください。 –