EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Delphi 7 - PGP email to Outlook with CGeep installed

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#7810
Posted: 10/07/2008 05:52:44
by Robert Priestley (Basic support level)
Joined: 10/07/2008
Posts: 2

Hi,
I am trying to send PGP encrytped emails from within a Delphi (D7) app to users who have Outlook and CGeep installed.
I load my CGeep public key as shown below, email is sent and received, but Outlook shows 2 attachmemnts, the 2nd od which is called encrypted.asc and contains the encrypted PGP message. Any idea what I am missing/doing wrong here?

FMessage := ElSimplePGPMIMEMessage.Create(nil);
lcPublicKey := TElPGPPublicKey.Create;

lcUserID := TElPGPUserID.Create;
lcUserID.Name := me@mydomain.co.uk';
lcPublicKey.AddUserID(lcUserID);
lcPublicKey.LoadFromFile(ExtractFilePath(Application.ExeName) +
'robert.priestley@codegate.co.uk.asc');
PGPKeyring.AddPublicKey(lcPublicKey)

// Now populate message
FMessage.From := 'me@mydoman.co.uk';
FMessage.To_.Add(edtTo.Text);
FMessage.Subject := edtSubject.Text;
FMessage.BodyPlain.Assign(mmoMessage.Lines);
FMessage.EncryptingKeys := PGPKeyring;
FMessage.PGPMIMEOptions.EncryptMessage := ckbEncrypt.Checked;
FMessage.PGPMIMEOptions.Passphrases.Clear;
FMessage.PGPMIMEOptions.EncryptionType := etPublicKey;

// Send message
PopulateMessage;
ElSMTPClient1.Open;
ElSMTPClient1.Login('');
ElSMTPClient1.Send(FMessage);
ElSMTPClient1.Close();
#7811
Posted: 10/07/2008 06:11:49
by Eugene Mayevski (EldoS Corp.)

First of all, did you try the sample application? Did it work for you?


Sincerely yours
Eugene Mayevski
#7813
Posted: 10/07/2008 08:06:15
by Robert Priestley (Basic support level)
Joined: 10/07/2008
Posts: 2

I assume you mean the SecureMail.exe?
No it doesn't work.
Attempting to encrypt a simple 1 line text file gives following results:
Output after selecting public key file is:

File to encrypt: C:\Documents and Settings\Rob Priestley\Desktop\pgptest.txt

File to write encrypted data: C:\Documents and Settings\Rob Priestley\Desktop\pgptest_2.txt

Keys:
Secret Keys:

Public Keys:
Key #1:
Names: Robert Priestley <robert.priestley@codegate.co.uk>
KeyID: 8A5A4EED
KeyFP: CA:D4:D4:2B:F9:47:3C:5C:71:87:16:48:61:25:8B:25:8A:5A:4E:ED
KeyID: 418D973D
KeyFP: 81:1D:ED:DA:C4:3E:52:A6:76:01:5D:5D:1B:B6:C1:07:41:8D:97:3D

ERROR Message after clicking encrypt button is:
Failed to assemble a message.
ElMime error code: 8
Message: "Access violation at address 2D6F7369. Read of address 2D6F7369"
#7815
Posted: 10/07/2008 08:44:38
by Eugene Mayevski (EldoS Corp.)

I have moved your question to HelpDesk for investigation.


Sincerely yours
Eugene Mayevski

Reply

Statistics

Topic viewed 1567 times

Number of guests: 2, 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!