HTML メールを送信するスクリプトを作成しました。Gmail では問題なく動作しましたが、Outlook で開いたところ、すべて中国語でした。
MIME メールについて学びました - メールの 2 つのバージョン (1 つは HTML 付き、もう 1 つはプレーン テキスト) を送信しますが、作成方法がわかりませんでした。秘密鍵付きの証明書が必要だとどこかで見ました。
誰かがそれを機能させる方法を説明できますか?
これは私のメール送信コードです:
'Send an email
strSMTPFrom = "Test@hp.com"
strSMTPTo = email 'Email taken from array
strSMTPRelay = "smtp1.hp.com"
strTextBody = strContent 'Content taken from the template
Set oMessage = CreateObject("CDO.Message")
oMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
oMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSMTPRelay
oMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
oMessage.Configuration.Fields.Update
oMessage.Subject = strSubject
oMessage.From = strSMTPFrom
oMessage.To = strSMTPTo
oMessage.HTMLBody = strTextBody
oMessage.Send