【发布时间】:2022-04-27 23:58:44
【问题描述】:
您好,有人知道如何使用特定的电子邮件地址字符串发送或回复 Outlook 邮件吗?
举例:
我的 Outlook 电子邮件地址是:
string email = "myOutlookEmailAddress@company.com";
现在我想使用(我的 Outlook 上特定邮箱中的电子邮件地址),而不是我的 Outlook 电子邮件地址:
string email = "otherEmailAddress@company.com";
我已经尝试过使用这个:
Outlook.Accounts accounts = application.Session.Accounts;
foreach (Outlook.Account account in accounts)
{
// When the e-mail address matches, return the account.
if (account.SmtpAddress == smtpAddress)
{
return account;
}
}
但它只查找我的 Outlook 应用程序中的帐户。
【问题讨论】:
-
所以您想从未在 Outlook 中配置的帐户发送消息?
-
@YacoubMassad 抱歉,我刚刚编辑了我的问题。
-
那么你找到合适的
Account了吗? -
@YacoubMassad 否,因为该邮箱的电子邮件地址不在帐户设置中:(您至少知道如何访问该邮箱的电子邮件地址吗?
-
您不能这样做,除非主帐户被授予另一个帐户的委托权限。而是与 SMTP 服务器通信。