Is your feature request related to a problem? Please describe.
When creating email messages, especially for SMTP transmission, there's no straightforward way to ensure that the mail text adheres to SMTP standards, particularly regarding line endings (CRLF) and line length limitations. This can lead to compatibility issues with certain email servers and clients.
Describe the solution you'd like
I propose adding an option to specify SMTP policy for mail text content. This feature would allow users to easily set the policy to SMTP when creating mail text, ensuring that:
All line endings are automatically converted to CRLF (\r\n).
Lines exceeding 78 characters are properly wrapped.
Content-Transfer-Encoding is appropriately set (7bit or base64 when necessary).
Ideally, this could be implemented as a simple parameter when creating mail text, such as:
Currently, workarounds include manually replacing line endings and implementing custom line wrapping logic. However, these solutions are error-prone and don't fully address all SMTP requirements.
Additional context
This feature would be particularly beneficial for developers working on email automation systems or integrating email functionality into applications where SMTP compliance is crucial for reliable message delivery.
Is your feature request related to a problem? Please describe.
When creating email messages, especially for SMTP transmission, there's no straightforward way to ensure that the mail text adheres to SMTP standards, particularly regarding line endings (CRLF) and line length limitations. This can lead to compatibility issues with certain email servers and clients.
Describe the solution you'd like
I propose adding an option to specify SMTP policy for mail text content. This feature would allow users to easily set the policy to SMTP when creating mail text, ensuring that:
Ideally, this could be implemented as a simple parameter when creating mail text, such as:
Describe alternatives you've considered
Currently, workarounds include manually replacing line endings and implementing custom line wrapping logic. However, these solutions are error-prone and don't fully address all SMTP requirements.
Additional context
This feature would be particularly beneficial for developers working on email automation systems or integrating email functionality into applications where SMTP compliance is crucial for reliable message delivery.