FMX programs use IdSMTP android email win10 Mail receiving title garbled is why?
Same program from win10 sent win10 received is normal,
The main code:
Void __fastcall TForm1: : Button1Click (TObject * Sender)
{
//want to be in email Settings enable SMTP
IdSMTP1 - & gt; The Host="smtp.163.com";
IdSMTP1 - & gt; Port=25;
IdSMTP1 - & gt; The Username="[email protected]";
IdSMTP1 - & gt; Password="XXX";
//try
{
IdSMTP1 - & gt; The Connect ().
//IdSMTP1 - & gt; Authenticate ();
}
//catch (... )
//{
//ShowMessage (u "connection server failed");
//return;
//}
IdMessage1 - & gt; The From - & gt; Address=IdSMTP1 - & gt; The Username;
IdMessage1 - & gt; Recipients - & gt; EMailAddresses="[email protected]".
IdMessage1 - & gt; CharSet="GBK";
IdMessage1 - & gt; Subject=Edit1 - & gt; The Text;
//IdMessage1 - & gt; Body - & gt; Text=Memo1 - & gt; The Text;
IdMessage1 - & gt; Body - & gt; The Assign (Memo1 - & gt; Lines);
Try
{
IdSMTP1 - & gt; Send (IdMessage1);
ShowMessage (u "email success");
}
The catch (... )
{
ShowMessage (u "mail delivery failure");
}
IdSMTP1 - & gt; Disconnect ();
}
//-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
CodePudding user response:
CodePudding user response:
Try setting ContentTransferEncodingCodePudding user response: