CDO.Message w / multiple address@school.edu.au不会发送

时间:2014-03-11 15:21:58

标签: smtp attachment cdo.message

所以这是一个有趣的。在某些情况下,不会发送消息。这是我找到的一个实例。请注意,它不会产生错误。

Set objMail = server.CreateObject("CDO.Message")
Set obj_conf = server.CreateObject("CDO.Configuration")
Set obj_fields = obj_conf.Fields
obj_fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
obj_fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.school.edu.au"
obj_fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = "0"
obj_fields("http://schemas.microsoft.com/cdo/configuration/smtserverpport") = "25"
obj_fields.Update
Set objMail.Configuration = obj_conf
objMail.From = """Person 1"" <Person1@school.edu.au>;"
objMail.ReplyTo = """Person 1"" <Person1@school.edu.au>;"
objMail.Subject = "school COMM TEST"
objMail.TextBody = "Comm testing" 
objMail.To = """Person 2"" <Person2@school.edu.au>;"
objMail.cc      = """My Name"" <myEmail@soemthing.com>;"
objMail.bcc       = """Person 2"" <Person2@school.edu.au>;"
objMail.AddAttachment "..\Attachment.htm"
objMail.send
Set objMail = Nothing
Set obj_conf = Nothing
Set obj_fields = Nothing

如果我不添加ReplyTo或附件,那么它发送正常。可能还有一些其他组合可以让它发挥作用。但是为什么当前的设置不起作用,为什么没有附件或没有ReplyTo它会工作?感谢您的任何意见!

1 个答案:

答案 0 :(得分:0)

在查看他们的附件后,我注意到他们有一行:<br><br> 我将它们与其他标签一起替换为<br />,它现在可以使用了。非常有趣,奇怪和令人费解的问题。但很高兴结束了!