Mailing with progress

vakpal

Member
Hello dear members,

Did anyone work with mailing in PROGRESS? I have a program, named smtpmail.p which can send mails. Anyone have tips how I can read the mail messages from a mailbox? I would like use this to fresh master data between applications.

cheers,
Gabor
 

vakpal

Member
thanks for the link, I tested but unfortunately does not function.

All ok until I try retrieve a message. Progress reports the "attempt to expand record beyond the maximum allowed size (444)" message and quits. The mails are surely below 32K. I have Progress version 9.1A.

What I do wrong?

thanks,
Gabor
 

vakpal

Member
strange.

this program uses a memptr to store the mail message. The size of this memory area is fixed to 22K. This memory area wil be copied to a charachter variable. If I set this value to 10K, it functions properly. Why does it not function with 22K - the limit is 32K in 9.1, isn't?
 

FrancoisL

Member
Why in the world would anyone start another Progress forum?

It funny because most of his Sub Section are the same name and has the same exact description then the ones on this forum. :lol: I too don't see the point of a new forum especially when it doesn't offer anything new and just copies this one.
 

FrancoisL

Member
[SIZE=-1]Progress411.com provides an active community of PROGRESS 4GL & RDBMS Developers[/SIZE]

Yeah 3 posts is about has active that you can get before crashing the server because you got too much activity :rolleyes:
 

dayv2005

Member
I been doing a lot of outlook integration with a lot of my apps. I'll send you some snippets when i get to work tomorrow morning i have ways to send emails. Task, appointments and so forth.
 

dayv2005

Member
Code:
DO WITH FRAME {&FRAME-NAME}:
    
    DEFINE VARIABLE attach-name  AS CHARACTER    NO-UNDO.
    DEFINE VARIABLE Folder       AS COM-HANDLE   NO-UNDO.
    DEFINE VARIABLE MailItem     AS COM-HANDLE   NO-UNDO.
    DEFINE VARIABLE message-text AS CHARACTER    NO-UNDO.
    DEFINE VARIABLE NameSpace    AS COM-HANDLE   NO-UNDO.
    DEFINE VARIABLE Outlook      AS COM-HANDLE   NO-UNDO.
    DEFINE VARIABLE priority     AS CHARACTER    NO-UNDO.
    DEFINE VARIABLE SafeItem     AS COM-HANDLE   NO-UNDO.

    CREATE "Outlook.Application" Outlook.
        
    ASSIGN 
        NameSpace   = Outlook:GetNameSpace("MAPI":U)
        Folder      = NameSpace:GetDefaultFolder(6)
        attach-name = SESSION:TEMP-DIRECTORY + PDFFileName.
    
    ASSIGN 
        MailItem            = Folder:Items:Add()
        MailItem:To         = scr-To:SCREEN-VALUE
        MailItem:Subject    = scr-Subject:SCREEN-VALUE
        MailItem:Body       = TRIM(ed-Mess:SCREEN-VALUE)
        MailItem:Importance = 0.


    MailItem:OriginatorDeliveryReportRequested = IF tDR:SCREEN-VALUE = "YES"
                                                        THEN TRUE ELSE FALSE.
    MailItem:ReadReceiptRequested              = IF tRR:SCREEN-VALUE = "YES"
                                                        THEN TRUE ELSE FALSE.
            
    MAilItem:Attachments:ADD(attach-name).
    
    /* Redemption addition */
    CREATE "Redemption.SafeMailItem" SafeItem.
        
    SafeItem:item = MailItem.
    SafeItem:SEND().
    /* addition ended */

    RELEASE OBJECT MailItem  NO-ERROR.
    RELEASE OBJECT Folder    NO-ERROR.
    RELEASE OBJECT NameSpace NO-ERROR.
    RELEASE OBJECT Outlook   NO-ERROR.
    RELEASE OBJECT SafeItem  NO-ERROR.

END.

END PROCEDURE.
 

rrojo7229

Member
Dear Gabor,


Gabor,

I saw your issue about How to read e-mail box.

I caught that programs from http://www.freeframework.org/downloads/unreviewed/

But always I receive this message below:
"-ERR Protocol error"

Do you know what does it means?

Or if you chose another solution, could you me say? I need, as weel, some code to read e-mails from an Outlook user and make download automatically of its file attached; each mail has just one file attached.

Thanks indeed.

Regards,
Ricardo Olguin


Hello dear members,

Did anyone work with mailing in PROGRESS? I have a program, named smtpmail.p which can send mails. Anyone have tips how I can read the mail messages from a mailbox? I would like use this to fresh master data between applications.

cheers,
Gabor
 

rrojo7229

Member
Dear Dayv,

Do you have an sample to read emails from an mailbox user?
I need read emails from an specific mailbox and save a file attached in each e-mail; each e-mail has just one file attached.

Thanks indeed.
Regards,
rrojo7229


Code:
DO WITH FRAME {&FRAME-NAME}:
 
    DEFINE VARIABLE attach-name  AS CHARACTER    NO-UNDO.
    DEFINE VARIABLE Folder       AS COM-HANDLE   NO-UNDO.
    DEFINE VARIABLE MailItem     AS COM-HANDLE   NO-UNDO.
    DEFINE VARIABLE message-text AS CHARACTER    NO-UNDO.
    DEFINE VARIABLE NameSpace    AS COM-HANDLE   NO-UNDO.
    DEFINE VARIABLE Outlook      AS COM-HANDLE   NO-UNDO.
    DEFINE VARIABLE priority     AS CHARACTER    NO-UNDO.
    DEFINE VARIABLE SafeItem     AS COM-HANDLE   NO-UNDO.
 
    CREATE "Outlook.Application" Outlook.
 
    ASSIGN 
        NameSpace   = Outlook:GetNameSpace("MAPI":U)
        Folder      = NameSpace:GetDefaultFolder(6)
        attach-name = SESSION:TEMP-DIRECTORY + PDFFileName.
 
    ASSIGN 
        MailItem            = Folder:Items:Add()
        MailItem:To         = scr-To:SCREEN-VALUE
        MailItem:Subject    = scr-Subject:SCREEN-VALUE
        MailItem:Body       = TRIM(ed-Mess:SCREEN-VALUE)
        MailItem:Importance = 0.
 
 
    MailItem:OriginatorDeliveryReportRequested = IF tDR:SCREEN-VALUE = "YES"
                                                        THEN TRUE ELSE FALSE.
    MailItem:ReadReceiptRequested              = IF tRR:SCREEN-VALUE = "YES"
                                                        THEN TRUE ELSE FALSE.
 
    MAilItem:Attachments:ADD(attach-name).
 
    /* Redemption addition */
    CREATE "Redemption.SafeMailItem" SafeItem.
 
    SafeItem:item = MailItem.
    SafeItem:SEND().
    /* addition ended */
 
    RELEASE OBJECT MailItem  NO-ERROR.
    RELEASE OBJECT Folder    NO-ERROR.
    RELEASE OBJECT NameSpace NO-ERROR.
    RELEASE OBJECT Outlook   NO-ERROR.
    RELEASE OBJECT SafeItem  NO-ERROR.
 
END.
 
END PROCEDURE.
 
Top