如何在Outlook中更改发件人名称? [英] How to change sender name in Outlook ?
问题描述
我正在使用Outlook
对象从子例程vba
I am sending an email using Outlook
object from a subroutine vba
电子邮件从我的电子邮件中发送出去,收件人看到:myemail@xxx.com
.有什么办法可以使那些收件人收到一封包含MyfirstName MylastName
而不是我的电子邮件
The email gets send from my email and the recipients see : myemail@xxx.com
. Is there any way I can make those recipients get an email that would have MyfirstName MylastName
instead of my email
Sub Mail_Workbook_1()
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.From = "MyfirstName MylastName" 'something like this
.To = "ron@debruin.nl"
.CC = ""
.BCC = ""
.Subject = "This is the Subject line"
.Body = "Hello World!"
....
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
推荐答案
如果您代表另一个邮箱通过Exchange发送邮件,请设置MailItem.SentOnBehalfOfName
属性(假设您具有足够的特权)
If you are sending through Exchange on behalf of another mailbox, set the MailItem.SentOnBehalfOfName
property (assuming you have sufficient privileges)
如果通过特定的SMTP帐户发送邮件,请设置MailItem.SendUsingAccount
属性.
If you are sending through a particular SMTP account, set the MailItem.SendUsingAccount
property.
如果您需要以任意SMTP用户身份发送,请参见此示例 -本质上,您将需要在PS_INTERNET_HEADERS命名空间中设置名为"From"的MAPI属性.请注意,并非所有的SMTP服务器都允许您这样做-Exchange for a不会让您欺骗发件人.
If you need to send as an arbitrary SMTP user, see this example - you will essentially need to set the "From" named MAPI property in the PS_INTERNET_HEADERS namespace. Note that not all SMTP servers will let you do that - Exchange for one will not let you spoof the sender.
如果要作为属于特定Exchange邮箱的别名(代理)SMTP地址之一发送,则将需要通过SMTP发送-通过OOM或MAPI发送将始终使用邮箱的默认SMTP地址发送.对于最终用户,您可以配置一个虚拟POP3/SMTP帐户,或使用类似代理管理器之类的产品.有关更多信息,请参见 MSOutlook.info
If you want to send as one of the alias (proxy) SMTP addresses belonging to a particular Exchange mailbox, you will need to send through SMTP - sending through OOM or MAPI will always send with the default SMTP address of the mailbox. For an end user, you can configure a dummy POP3/SMTP account or use a product like Proxy Manager. See MSOutlook.info for more information.
这篇关于如何在Outlook中更改发件人名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!