图像没有显示为嵌入在我的应用程序发送的电子邮件中

发布于 2024-07-16 06:53:10 字数 360 浏览 2 评论 0原文

我正在尝试使用 Indy 通过 delphi 应用程序发送一封带有嵌入图像的电子邮件,但不知何故它不起作用。

我将我发送的电子邮件的内容与从 gmail 发送的电子邮件的内容进行了比较,一切都很好,但我可能遗漏了一些小细节。

Gmail 将我的电子邮件的附加图像显示为普通附件,但它被正确设置为内联。

编辑

使用TIdMessageBuilderHtml解决第一次尝试就完美地工作了。

I'm trying to send an email with embedded images through a delphi application using Indy, but somehow it isn't working.

I compared the contents of the email I sent with one sent from gmail, and everything seens fine, but I might be missing some little detail.

Gmail shows the attached image of my email as a normal attachment, but it is set correctly as inline.

EDIT

Solved using the TIdMessageBuilderHtml it worked perfectly on the first try.

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

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

发布评论

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

评论(1

酒中人 2024-07-23 06:53:10

使用 TIdMessageBuilderHtml 解决了它在第一次尝试时完美运行。

只需几行代码:

  with TIdMessageBuilderHtml.Create do
    try
      Subject := 'example';
      Html.Text := 'HTML goes here';
      HtmlFiles.Add('c:\folder\image1.jpg');
      HtmlFiles.Add('c:\folder\image2.jpg');
      FillMessage(IdMessage1);
    finally
      Free;
    end;

Solved using the TIdMessageBuilderHtml it worked perfectly on the first try.

Just a few lines of code:

  with TIdMessageBuilderHtml.Create do
    try
      Subject := 'example';
      Html.Text := 'HTML goes here';
      HtmlFiles.Add('c:\folder\image1.jpg');
      HtmlFiles.Add('c:\folder\image2.jpg');
      FillMessage(IdMessage1);
    finally
      Free;
    end;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文