使用 Office365 帐户通过 PowerShell 发送电子邮件

发布于 2025-01-12 05:07:18 字数 210 浏览 5 评论 0原文

我想使用 PowerShell 的 cmdlet Send-MailMessage 发送电子邮件,但是我们使用 Office365 进行操作,基础设施工程师建议使用 PowerShell 连接到 Exchange,用户需要管理员权限,这是可以理解的,他们不需要想要授予。我认为这太过分了,想看看是否有任何解决方法可以让我使用标准电子邮件帐户通过 PowerShell 发送电子邮件

I want to send out emails using PowerShell's cmdlet Send-MailMessage, however we operate with Office365 and an infrastructure engineer has suggested to connect to Exchange with PowerShell, the user needs admin rights, which understandably, they do not want to grant. I thought this was excessive and wanted to see if there were any work arounds which allowed me to send emails through PowerShell using a standard email account

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

江心雾 2025-01-19 05:07:18

您可以使用 Graph API 或 EWS,请参阅<一个href="https://learn.microsoft.com/en-us/exchange/client-developer/exchange-web-services/explore-the-ews-management-api-ews-and-web-services-in-exchange " rel="nofollow noreferrer">探索 Exchange 中的 EWS 托管 API、EWS 和 Web 服务以了解详细信息。

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文