Home > Back-end >  Email FMX programs use IdSMTP android win10 Mail receiving title garbled is why?
Email FMX programs use IdSMTP android win10 Mail receiving title garbled is why?

Time:09-15

 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 ContentTransferEncoding

CodePudding user response:

refer to the second floor early play big play nuclear response:
Settings ContentTransferEncoding try


I am try to see,

CodePudding user response:

refer to the second floor early play big play nuclear response:
Settings ContentTransferEncoding try


I added these two code words:
IdMessage1 - & gt; ContentTransferEncoding="8 bit";//tried binary
IdMessage1 - & gt; Encoding=TIdMessageEncoding: : meMIME;//this will lead to win10 received mail content is??????
Seems this property will only change the email, the mail title doesn't work,

CodePudding user response:

CodePudding user response:

  • Related