Search Persits Software Knowledge Base

 

Article PS01032926

Messages sent by AspEmail appear truncated and may contain stray characters

Problem Description

When trying to send a message with AspEmail that is longer than a few hundred characters, the received message appears truncated and sometimes contains stray characters such as '!'.

Solution

This occurs because your mail server imposes a restriction on the length of individual lines in a message body. According to SMTP specifications, this limit is 76 characters per line. To ensure that your message does not contain lines longer than 76 characters, you can:

1. Insert end-of-line character pairs chr(13) & chr(10) into your message body as follows:

Mail.Body = "line 1" & chr(13) & chr(10) & "line 2" etc.

or

2. Use the Quoted-Printable feature of AspEmail by setting

Mail.ContentTransferEncoding = "Quoted-Printable"

which will format your message automatically to conform to the 76-character-per-line restriction.

Created: 2/8/2002 4:32:38 AM
Last Modified: 2/9/2002 4:11:18 PM

Copyright © Persits Software, Inc. 1998 - 2018
For technical support, write to support@persits.com.