這裏是我的代碼不能用delphi印
電子郵件的身體已經得到了一些Unicode字符
LSMTP := TIdSMTP.Create(nil);
try
LMsg := TIdMessage.Create(LSMTP);
try
with LMsg do
begin
Subject := Subj;
Recipients.EMailAddresses := Email;
WriteToLog(cInformation,'To: '+Recipients.EMailAddresses);
From.Address := ReplaceVariables(From_Address);
From.Name := ReplaceVariables(From_Name);
Body.Text := EmailMessage;
ContentTransferEncoding := '8bit';
CharSet := 'UTF-8';
ContentType := 'text/plain';
end;
而這就是我得到
Content-Type: text/plain; charset=us-ascii <<<<< WRONG
Content-Transfer-Encoding: 8bit
Date: Fri, 23 Mar 2012 17:53:19 +0000
使用發送UTF-8的電子郵件delphi 2009