Indy9 the subject of email sending is too long. Solution

Source: Internet
Author: User

Last month, we used Delphi + indy9 to write a DLL file for SMTP mail sending for the company's ERP system (PowerBuilder.

A problem is found during use. When the subject of the email is too long, the recipient will receive a garbled email.

After searching on the network, I checked Indy'sSource codeThe problem is that Indy uses base64 encoding to encode the subject, such as Chinese and non-ASCII characters. If the encoded content exceeds 75 bytes, it is split into multiple lines. A carriage return line break is added between the row and the row.

How can I solve the problem?

I was going to modify the multi-row Processing Method of Indy. The result was half-day old. Then I simply changed the limit of 75 bytes to 175 bytes, and the test was OK.

So let's do it first.

The specific modification location is in line 599th of delphi_path \ source \ Indy \ idcoderheader. Pas.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.