EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Body as ATT001..txt when send mail via exchange server

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#36707
Posted: 05/11/2016 08:44:02
by delagoutte jean (Standard support level)
Joined: 04/02/2009
Posts: 34

I'm using TElMessage and TElSMTPClient for sending email in our app. We have a bug when we sent email to exchange server. If there is attachment and body was set after adding atttachment, then the client receive email with an attachment ATT00001..txt with the body text and nothing in the body.

see :
http://exchange-server-guide.blogspot.fr/2015/11/att00001.txt-file-fix-email-attachment-issue.html

I had
Code
mmp : TElMultiPartList;

procedure TMyMailMsg.SetBody(aBodyText : string);
var abody : TElPlainTextPart;
begin
   abody := TElPlainTextPart.Create;
   abody.SetText(aBodyText);  
   mmp.AddPart(abody);
end;

for fix it, i do :
Code
mmp : TElMultiPartList;

procedure TMyMailMsg.SetBody(aBodyText : string);
var abody : TElPlainTextPart;
begin
   abody := TElPlainTextPart.Create;
   abody.SetText(aBodyText);  
   mmp.AddPart(abody,false,0);
end;

so i set the body to the first position in the list of message part.

Could you include a patch in the next version for TElSMTPClient.
This patch could reorder attachement for always having body in first position before send email ?
#36708
Posted: 05/11/2016 09:02:12
by Eugene Mayevski (EldoS Corp.)

Thank you for contacting us.

While your code works for you, in general reordering the parts in the component is not the best idea. SecureBlackbox is flexible enough to give you all tools to control the order. If the user wants the parts to be in the particular order, we can't should not interfere - it's a customer's decision to have the specific order of the parts.

If you add the text part after the attachment, the obvious solution would be to change your code that adds parts, so that the attachment would be added after the text part.


Sincerely yours
Eugene Mayevski
#36710
Posted: 05/11/2016 09:10:58
by delagoutte jean (Standard support level)
Joined: 04/02/2009
Posts: 34

thanks, i'm understanding your position

Reply

Statistics

Topic viewed 1132 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!