EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Mime message

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.
#4378
Posted: 11/22/2007 07:48:49
by BENICHOU Jean-Philippe (Standard support level)
Joined: 06/21/2007
Posts: 4

Hi, everybody

I have this code:

clMonMessage is a TElMessage(True, "Winlabo C.C.I.F.")
clAnsiString is a TAnsiStringStream
sNomFichier is a string

sNomFichier = "C:\RESUTEXT"

clMonMessage:Clear(True)
clMonMessage:AttachFile("Application/x-hprimnet; charset=us-ascii", sNomFichier)
clMonMessage:SetSubject("TEST")
clMonMessage:get_From():AddAddress("jp.benichou.ccif@free.fr", "jp.benichou.ccif@free.fr")
clMonMessage:To_:AddAddress("jp.benichou.ccif@free.fr", "jp.benichou.ccif@free.fr")
clMonMessage:set_Priority(TElMIMEMessagePriority::mpNormal)
clMonMessage:set_RequestReadReceipt(True)

clMonMessage:SetDate(DateTime::get_UtcNow())
clMonMessage:MessageID = TElMessage::GenerateMessageID()
clMonMessage:AssembleMessage(clAnsiString, "utf-8", TElHeaderEncoding::heBase64, "base64", "base64", True)


It's create an email:

From: "jp.benichou.ccif@free.fr" <jp.benichou.ccif@free.fr>
To: "jp.benichou.ccif@free.fr" <jp.benichou.ccif@free.fr>
MIME-Version: 1.0
X-Mailer: EldoS SecureBlackbox, version: 2006.09.18
Content-Type: multipart/mixed;
boundary="----=_NextPart_501_3785_3940805007826968"
Subject: EldoS SecureBlackbox, version: 2006.09.18
Date: Fri, 22 Nov 2007 12:01:06 -01:00
Message-ID: <200711221201060125@34332169>

This is a multi-part message in MIME format.

------=_NextPart_501_3785_3940805007826968
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: base64



------=_NextPart_501_3785_3940805007826968

Content-Type: application/octet-stream;
name=RESUTEXT
Content-Disposition: attachment;
filename=RESUTEXT
Content-Transfer-Encoding: base64

MDYz...ICAg
ICAg...ICAg
ICAg...ICAg
ICAg...ICAg
ICAg...RVNU
DQpB...DQog
DQoy...RSBD
QVJM...PT09
PT09...Cg0K
ICAg...LiAu
IC4g...LjAg
.... etc


But I have to create email like this:


From: "jp.benichou.ccif@free.fr" <jp.benichou.ccif@free.fr>
To: "jp.benichou.ccif@free.fr" <jp.benichou.ccif@free.fr>
MIME-Version: 1.0
X-Mailer: EldoS SecureBlackbox, version: 2006.09.18
Content-Type: multipart/mixed;
boundary="----=_NextPart_501_3785_3940805007826968"
Subject: EldoS SecureBlackbox, version: 2006.09.18
Date: Fri, 22 Nov 2007 12:01:06 -01:00
Message-ID: <200711221201060125@34332169>

This is a multi-part message in MIME format.

------=_NextPart_501_3785_3940805007826968
Content-Type: application/octet-stream;
name=RESUTEXT
Content-Disposition: attachment;
filename=RESUTEXT
Content-Transfer-Encoding: base64

MDYz...ICAg
ICAg...ICAg
ICAg...ICAg
ICAg...ICAg
ICAg...RVNU
DQpB...DQog
DQoy...RSBD
QVJM...PT09
PT09...Cg0K
ICAg...LiAu
IC4g...LjAg
.... etc


In fact, I don't want to have the part of my message I colored in red.

How can I do that?

Thanks,

Jean-Philippe
#4382
Posted: 11/22/2007 09:30:48
by Ken Ivanov (EldoS Corp.)

Please use the following code to construct the message (Delphi notation):

Code
  clMonMessage := TElMessage.Create(false, 'Winlabo C.C.I.F.');
  clMonMessage.Clear(true);
  clMonMessage.SetMainPart(TElMultiPartList.Create, false);
  clMonMessage.AttachFile("¬≠Application/x-hprimnet; charset=us-ascii", sNomFichier)
  ...
#4398
Posted: 11/23/2007 09:15:58
by BENICHOU Jean-Philippe (Standard support level)
Joined: 06/21/2007
Posts: 4

It works perfectly!
Thanks!

Reply

Statistics

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