Home > Back-end >  Is there a limit indy email subject string length?
Is there a limit indy email subject string length?

Time:10-18

With idsmtp and idmessage recently wrote an email program, find idmessage sbject string length is more than 44 email would be a problem, such as receiving side received the title of the truncated, and the attachment can't display properly,

I don't know which encountered such a situation, is only a matter of what?

CodePudding user response:

Their settled, here to share

1) USES add IdcoderMIME reference

2) var IdEncoderMIME1: TIdEncoderMIME;

3) will be treated as a subject for the following:

STR:='" "+ STR +"' "+ inttostr (fileList. Count) + 'files to send;
IdEncoderMIME1:=TIdEncoderMIME. Create (nil);
Idmsg1. Subject:='=? GB2312? B? '+ IdEncoderMIME1. EncodeString (STR) +'?=';
IdEncoderMIME1. Free;
  • Related