当尝试使用其他收件箱发送电子邮件时,我将.SentOnBehalfOfName
更改为我想要发送的电子邮件。MS Access Redemption删除“代表发送人”
但是,邮件到达“MyRealName代表EmailAddressIWantToSendFrom”。
我该如何删除MyRealName?
编辑:
Set outlookApp = CreateObject("Outlook.Application")
Set namespace = outlookApp.GetNamespace("MAPI")
namespace.Logon
Set MyItem = outlookApp.CreateItemFromTemplate(path_to_msg_file)
...
pretend that this comment is a bunch of code that modifies the body of MyItem, mostly doing text replacements in MyItem.HTMLBody
...
Set safeItem = CreateObject("Redemption.SafeMailItem")
Set oItem = MyItem
safeItem.Item = oItem
safeItem.To = "person I want to send to"
safeItem.SentOnBehalfOfName = "desired address I want to sent from"
safeItem.Recipients.ResolveAll
safeItem.Send
你可以编辑多个电子邮件属性,甚至'.From'属性,并将其设置为'vbNullString'。但最后,这一切都取决于电子邮件服务器以及如何设置此服务器。在大多数公司中,您不能更改,隐藏或遮掩发件人的电子邮件地址或姓名。这可能是某种形式的“身份盗用”(如果发送电子邮件的真实人员 - 即使它是正确代表)将会丢失。如果您有兴趣,您可能希望Google“发送匿名电子邮件”并查看结果以获取更多信息。 – Ralph
我试着设置'.From'到'vbNullString'和EmailAddressIWantToSendFrom,都没有伤心 – DoubleBass
Outlook对象模型和Redemption都没有From属性。 –