如果在执行UFT自动化脚本时发生任何故障,我有要求向单个/多个用户发送短信的要求。 我已经使用下面的代码&更新了smtp服务器名称到我在Outlook帐户settings.Below代码失败,错误“至少需要一个收件人,但没有找到”。使用HP UFT发送短信12.02
请帮我解决这个问题。另外请注意,我不能使用任何免费短信API因访问限制
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Test Failed"
objMessage.Sender = "[email protected]"
objMessage.To = "+91XXXXXXXXXX"
objMessage.TextBody = "Test XYZ failed at: " & Now
'Configuration information for the remote SMTP server.
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "Server
name"
'Server port
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
objMessage.Send
Set objMessage = Nothing
有没有什么办法可以从办公室传播者API在VBScript中发送短信? – UFTTester