Reading email box to take out attachments, unzip files from

Posted by PeterWokke on 30-Oct-2014 09:40

Any one who has some experience to link the an mail box and to get the attached zip file out of the mail.

The zip file contain EDI message file I have to extract for processing.

Can this be done from a Progress session or should you make processing scripts onto the mail account on the mail server.

Thank for reading and I hope to get some reactions.

Kind regards,

Peter Wokke 

All Replies

Posted by gabriel.lucaciu on 30-Oct-2014 10:07

Hi Peter,

Did you try to use Redemption (CREATE "Redemption.SafeMailItem" h_SafeMail) for getting the attachments.

See: www.dimastr.com/.../safe_Attachment.htm

With this you can use the method SaveAsFile(Path) to save the attachment.

As for extraction, I'm not sure if you can make the extraction directly from Progress. Eventually you might be able to use some external libraries(.dll) for extraction.

Regards,

Gabriel

Posted by PeterWokke on 31-Oct-2014 07:10

Gabriel,

Thank you kindly for your information. Redemption we use in our application to send emails.

I have to replace the 32bit DLL with the 64bit DLL.

I read in the site that there is a .Net option for Redemption.

Do you know if it will work in Progress sessions to and if it can be loaded in PDSOE as user control?

On the site I cannot find it. Bot if it is a class based on standard .Net controls it should work???

Kind regards,

Peter

Posted by Peter Judge on 31-Oct-2014 07:26

> I read in the site that there is a .Net option for Redemption.

> Do you know if it will work in Progress sessions to and if it can be loaded in PDSOE as user control?

> On the site I cannot find it. Bot if it is a class based on standard .Net controls it should work???

In theory, it should work just fine.
-- peter
 
 
[collapse]
From: PeterWokke [mailto:bounce-PeterWokke@community.progress.com]
Sent: Friday, 31 October, 2014 08:12
To: TU.OE.Development@community.progress.com
Subject: RE: [Technical Users - OE Development] Reading email box to take out attachments, unzip files from the attachment
 
Reply by PeterWokke

Gabriel,

Thank you kindly for your information. Redemption we use in our application to send emails.

I have to replace the 32bit DLL with the 64bit DLL.

I read in the site that there is a .Net option for Redemption.

Do you know if it will work in Progress sessions to and if it can be loaded in PDSOE as user control?

On the site I cannot find it. Bot if it is a class based on standard .Net controls it should work???

Kind regards,

Peter

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Richard.Kelters on 31-Oct-2014 08:01

Don't know if you're looking to read mail through pop3. I've implemented an opensource .NET control sourceforge.net/.../hpop once. Had to recompile the c# library because of a callback when trying to read mail from exchange. Let me know if this is what you're looking for and need some help.

Posted by PeterWokke on 31-Oct-2014 08:45

Richard,

Thank you kindly for this info. There are two flavors IMAP and POP3.

Do not know which one the application users have. Can be either of those.

This could be the second option I have to implement into the application next to Redemption.

Now I have an Redemption.dll and a xpMail.dll so I can use both.

Only problem I have to replace them to 64bit.

I don't know the origin from the xpMail.dll.

What had you do to solve the problem with the callback. Made any change in the source for that?

I have never recompiled a c# library. Maybe I can replace the xpMail for hpop dll.

Hope you could help me on this?

Kind regards,

Peter    

Posted by Peter Judge on 31-Oct-2014 08:52

Peter,
 
If you have a .NET DLL (assembly) you should be fine regardless of bitness.
 
If Redemption prodives a 64-bit ActiveX you should also be OK with 64-bit OE.
 
-- peter
 
[collapse]
From: PeterWokke [mailto:bounce-PeterWokke@community.progress.com]
Sent: Friday, 31 October, 2014 09:46
To: TU.OE.Development@community.progress.com
Subject: RE: [Technical Users - OE Development] Reading email box to take out attachments, unzip files from the attachment
 
Reply by PeterWokke

Richard,

Thank you kindly for this info. There are two flavors IMAP and POP3.

Do not know which one the application users have. Can be either of those.

This could be the second option I have to implement into the application next to Redemption.

Now I have an Redemption.dll and a xpMail.dll so I can use both.

Only problem I have to replace them to 64bit.

I don't know the origin from the xpMail.dll.

What had you do to solve the problem with the callback. Made any change in the source for that?

I have never recompiled a c# library. Maybe I can replace the xpMail for hpop dll.

Hope you could help me on this?

Kind regards,

Peter    

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Richard.Kelters on 01-Nov-2014 09:14

OpenPop only reads mail through pop3 for IMAP you'll need to find something else.

When reading mail from an exchange server you'll need to implement a certificate validation which is done in c# with a callback which is not supported in OpenEdge. I've edited the Pop3Client.cs and added the following method (see below). You can recompile the .NET control with SharpDevelop ( http://www.icsharpcode.net/opensource/sd/ ) which is pretty straight forward.

Richard

   /// <summary>

/// Method for bypassing certificate check needed for single thread OpenEdge application

private static bool certificateValidator(object sender, System.Security.Cryptography.X509Certificates.X509Certificate certificate, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslpolicyerrors)

   {

     return true;

   }

Posted by OctavioOlguin on 28-Apr-2016 17:51

I wonder if this subject has evolved into something that can be shared, as I need to do exactly the same as this post...

TIA

Jorge

Posted by tbergman on 28-Apr-2016 22:09

If you don't mind spending a few dollars (~$300 for their entire set of components), to likely save many thousands in development time, look at the products available from http://www.chilkatsoft.com/default.asp.

Relevant to this thread are their Mail and Zip products.  Makes this pretty easy in Windows with .Net or ActiveX. I know they support other OS's but I have no experience with these.

For Mail, they support Pop3, IMap, and Exchange. Makes this all pretty easy. Been using their stuff for years, works great. I have no relation, other than as a satisfied customer, with this company.

Tom 

Posted by OctavioOlguin on 28-Apr-2016 22:11

Thanks!!!

I'll check it out...

Posted by Roger Blanchard on 29-Apr-2016 06:22

Tom,

Do you have better luck with the mail control from chilkatsoft than with the .NET MailMessage / SMTPClient? We have been using MailMessage with SMTPClient for years with no issues. I would not consider the volume of mail we are sending as high.

Posted by tbergman on 29-Apr-2016 07:36

Hi Roger,
 
I’ve been using the ChilKat controls for much longer that there’s been a .Net bridge in Progress by using their ActiveX versions. I now use a mix of both ActiveX and .Net, depending upon when the function was last updated significantly.
 
It works well enough and is cheap enough that I’ve not spent any time shopping around.
 
Note that we do some fairly complex sending and receiving including inline images, attachments, HTML mail, etc. They’ve wrapped a lot of the complexities of this in simple methods.
 
Tom
 

Posted by Roger Blanchard on 29-Apr-2016 07:39

Thanks for the info Tom. I may have to take a look. We simply send an email with an attachment from time to time.

See you in June.

Roger

This thread is closed