【问题标题】:send email using exchange web server with body contains URL使用正文包含 URL 的 Exchange Web 服务器发送电子邮件
【发布时间】:2016-06-10 14:38:21
【问题描述】:

我正在尝试使用 Exchange Web 服务 c# 发送电子邮件。如果正文包含普通文本,它可以正常工作。但是正文包含如下所示的 URL 不起作用。它正在发送邮件,但收据端没有 URL。

网址包含

http://localhost:52122/Home?Function=ABC&Parameter1=12345

请帮忙。

提前致谢

【问题讨论】:

  • 请显示带有 url 的电子邮件正文
  • 我要发送到交换服务以发送邮件的 url 的正文是“localhost:52122/Home?Function=ABC&Parameter1=12345>”
  • 只添加localhost:52122/Home?Function=ABC&Parameter1=12345。您可以尝试添加 href="localhost:52122/… 链接,但由于 emal 中的正文是纯文本,它不会呈现 html 链接。一些现代邮件客户端可能具有该功能
  • 您的问题解决了吗?

标签: c# exchangewebservices


【解决方案1】:

用这段代码替换正文内容

string Url = "localhost:52122/Home?Function=ABC&Parameter1=12345";
string EmailBody = @"Email Body </br> please " + String.Format("<a href='{0}'>Click here</a>", Url);

【讨论】:

    猜你喜欢
    • 2011-04-18
    • 2011-12-03
    • 1970-01-01
    • 1970-01-01
    • 2017-07-28
    • 1970-01-01
    • 2013-08-10
    • 2017-04-19
    • 2012-07-13
    相关资源
    最近更新 更多