如何使用 Gmail 的 SMTP 和 Indy 10 发送电子邮件?

发布于 2024-08-07 18:23:22 字数 345 浏览 2 评论 0原文

我正在使用 Delphi 2009 和 svn 中最新的 Indy 10 通过 SMTP 发送电子邮件,但它不适用于 Gmail(Google Apps 托管域)。当我尝试发送电子邮件时,我收到“必须首先发出 STARTTLS 命令”。

我尝试用谷歌搜索它,找到了几个论坛和几个解决方案,但他们都只是抨击了一些代码或者只是说我需要一个 OpenSLL DLL,到目前为止我还不太清楚我到底需要什么。

有人可以准确地告诉我需要哪个 DLL 以及我必须在 TIdSMTP 和 TIdMessage 对象中更改什么才能通过 Gmail 的 SMTP 服务器发送电子邮件吗?

另外,非常欢迎解释为什么此身份验证不同以及 DLL 的用途。

I'm using Delphi 2009 and the lastest Indy 10 from svn to send e-mails using SMTP, but it doesn't work with Gmail (Google Apps hosted domain). When I try to send an e-mail I get "Must issue a STARTTLS command first".

I tried Googling about it and I found several forums and several solutions, but they all just bashed some code or just said I needed an OpenSLL DLL, which so far isn't very clear to me exactly what I need.

Can someone please tell exactly which DLL I need and what do I have to change in the my TIdSMTP and TIdMessage objects in order to send the e-mails through Gmail's SMTP server?

Also, an explanation about why this authentication is different and what the DLL is for is very welcome.

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

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

发布评论

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

评论(1

满地尘埃落定 2024-08-14 18:23:22

也许Marco可以帮助您...

编辑:使用此链接源代码

Perhaps Marco can help you...

Edit: with this link to the source code.

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