EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SMTP assembly failed

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
#37644
Posted: 09/06/2016 13:15:50
by Toni Santa (Standard support level)
Joined: 05/27/2013
Posts: 57

hi,
sending a message with subject containing some non ASCII character like a long "-" (writing in word abc - def the "-" is replaced by a long "-"), when posting the message an error "Mail message assembly failed (error code is 1)" is returned. Such text can be pasted to the edits if the font of the edit (or form, with parentfont=true) is set for example to "Segoe". To reproduce the problem, please try with your SMTP Client Demo (Delphi).
best regard
Toni
#37647
Posted: 09/07/2016 09:09:09
by Eugene Mayevski (EldoS Corp.)

The problem and the answer to it heavily depend on the particular conditions and can not be given without knowing the extensive details. I assume that you use ANSI library, hence the problem -- the character doesn't fit into the selected character set.


Sincerely yours
Eugene Mayevski
#37652
Posted: 09/08/2016 03:10:01
by Alexander Ionov (EldoS Corp.)

Quote
Toni Santa wrote:
sending a message with subject containing some non ASCII character like a long "-" (writing in word abc - def the "-" is replaced by a long "-")

First of all, the returned code 1 is not actually an error, but a warning.

In my Word, "-" (0x2D) is replaced by long "-" (0x96).

If no charset specified for the mail message (in this case, the ASCII charset is used) or the specified charset has no character with code 0x96, this character is replaced by "?" and the AssembleMessage method returns a warning.

If there is correct charset specified for the message (for example, utf-8), the 0x96 character is encoded correctly according to the specified charset and no warning is returned.


--
Best regards,
Alexander Ionov
#37655
Posted: 09/08/2016 05:29:41
by Toni Santa (Standard support level)
Joined: 05/27/2013
Posts: 57

Hi,
in the btnSendClick of the "SMTP Client Demo" I added
Msg.CharSet := 'utf-8';
Msg.HeaderEncoding := heBase64;
but nevertheless I receive the same warning. Trying with 'utf-16' and heAutoDetect the warning is always the same. What do I miss?
with best regards
Toni
#37657
Posted: 09/08/2016 06:21:13
by Toni Santa (Standard support level)
Joined: 05/27/2013
Posts: 57

Hi,
debuging the "SMTP client demo" I figured out that CharSet-Property is reset to 'iso-8859-1' by invoking SetMainPart. So setting it to 'utf-8' after .SetMainPart resolves the problem.
best regards
Toni
Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.

Reply

Statistics

Topic viewed 254 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!