我目前正在使用outlook.application
从共享邮箱发送邮件。
我需要一种方法来发送这些邮件,而不会在“发件人”列表中显示我的电子邮件地址。它应该只是出现的共享邮箱。目前我正在使用.sentOnBehalfOf
,还有其他我应该使用的东西吗?
答案 0 :(得分:1)
请求发送为权限。
您应该可以在电子邮件的“发件人”字段中选择共享帐户。
使用.SendUsingAccount在VBA中指定共享帐户。
http://www.rondebruin.nl/win/s1/outlook/account.htm
Sub Which_Account_Number()
'Don't forget to set a reference to Outlook in the VBA editor
Dim OutApp As Outlook.Application
Dim I As Long
Set OutApp = CreateObject("Outlook.Application")
For I = 1 To OutApp.Session.Accounts.Count
MsgBox OutApp.Session.Accounts.Item(I) & " : This is account number " & I
Next I
End Sub
共享帐户可能是2。
With OutMail
.SendUsingAccount = OutApp.Session.Accounts.Item(2)
End With