Oto mój kodNie mógł wysłać UTF-8 e-mail przy użyciu Delphi Indy
ciało Email ma kilka znaków 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;
A to co mam
Content-Type: text/plain; charset=us-ascii <<<<< WRONG
Content-Transfer-Encoding: 8bit
Date: Fri, 23 Mar 2012 17:53:19 +0000
Używanie delphi 2009