【问题标题】:Enforce monospace display of email (using Delphi 7)强制电子邮件等宽显示(使用 Delphi 7)
【发布时间】:2013-10-29 20:51:36
【问题描述】:

目前,我们公司通过电子邮件向客户发送使用等宽字体构建的报告。

例如

Source                                    Count    Male   Female
----------------------------------------------------------------
ABC      A Brand Name Company                  106     35     71
DEF      Default Earth Factories                 1      0      1
GHI      Greater Height Industries               1      0      1
JKL      Jo King Limited                         0      0      0

报告直接构建到存储在我们服务器上的 .eml 文件的主体中。

我们的旧版 Delphi 7 程序然后通过电子邮件将其发送给通过 Outlook 接收和打开它的客户,它会导致 锯齿状 文本。 (他们不想更改 Outlook 设置以正确显示这些报告。)

procedure Report_Function(Sender: TObject);
var
  F: Textfile;
  filename: string;
begin
  filename := 'N:\Reports\' + LowerCase(fMainMenu.Org) + '.eml';
  AssignFile(F, filename);
  try
    Rewrite(F);
    Writeln(f, Nice(qrRegSum.qrlDescription.Caption, 36) + '  Count    Male   Female');
    Writeln(f, '------------------------------------------------------------');
    while (not dmReports.qSiteInfo.EOF) do  // Populate Report
    begin
      dmReports.qSiteInfo.Next;
    end;
  finally
    CloseFile(f);
  end;
  SendEmail(Filename, Subject);
end;

有没有办法强制电子邮件的等宽字体显示(使用 Delphi 7)?

【问题讨论】:

    标签: delphi email delphi-7 monospace


    【解决方案1】:

    您需要使用 HTML 或 RTF 格式化电子邮件,然后您可以在其中嵌入字体信息。如果您将电子邮件格式化为纯文本,您将失去对其字体格式的所有控制。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-07-10
      • 2011-02-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-16
      • 1970-01-01
      • 2019-07-12
      • 2012-12-29
      相关资源
      最近更新 更多