× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



>>Because not everyone will understand them..."
That is so funny since you are also using free format. Free format would
seem to me to be much more complex to a stagnant RPG programmer.


Bob Cozzi
Cozzi Consulting
www.rpgiv.com


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Joe Giusto
Sent: Thursday, July 24, 2003 5:26 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: RPGMail Wrapping was -> Catch 'n release MONITOR'd message

Just to make it easier for everyone to call it in a way that they are
accustom to doing (i.e. [don't laugh] with call and parm list as we really
are not [supposed to be] using any procedures here because "not everyone
will understand them").  
The example that I downloaded had hard coding for the from, to, subject,
body, ect.  Which is just fine because it is [in my opinion] just a skeleton
or template.  But rather that have the code copied into places, I wanted to
present the idea as a simply called RPG program without anyone needing to
understand what makes it work.  Then if we need custom stuff, I can change
it in just one place.  Currently I only put in 4 parms to test the idea, but
plan to evaluate our needs and eventually include most or all in the parm
list.  I even thought of writing a command around it so that it can be
easily prompted in a CL program.

Here is what I have so far:
0001.00
//*********************************************************************
000000
0002.00  //  Program.......: RPGMail
030626
0003.00  //  Creation Date.: 07/22/2002
000000
0004.00  //  Author........: Aaron Bartell
000000
0005.00  //  Copyright.....: All Rights Reserved.
030716
0006.00  //  Description...: RPG call Java method to send email.
000000
0007.00
//*********************************************************************
000000
0008.00 H DftActGrp(*NO) ActGrp(*CALLER) Thread(*Serialize)
BndDir('RPGMAIL')           030707
0009.00
030626
0010.00  /Copy QSource,RPGMailPr
030707
0011.00
030707
0012.00 D RPGMAILTS2      PR
030723
0013.00 D   EPFROM                     256A   Const
030723
0014.00 D   EPTO                       256A   Const
030723
0015.00 D   EPSUBJECT                  256A   Const
030723
0016.00 D   EPTEXT                     256A   Const
030723
0017.00
030723
0018.00 D RPGMAILTS2      PI
030723
0019.00 D   EPFROM                     256A   Const
030723
0020.00 D   EPTO                       256A   Const
030723
0021.00 D   EPSUBJECT                  256A   Const
030723
0022.00 D   EPTEXT                     256A   Const
030723
0023.00
030723
0024.00 D   XXFROM        S            256A
030723
0025.00 D   XXTO          S            256A
030723
0026.00 D   XXSUBJECT     S            256A
030723
0027.00 D   XXTEXT        S            256A
030723
0028.00
030723
0029.00 D from            S            256A   Inz('me@xxxxxxxxxxxxx')
030723
0030.00 D to              S            256A   Inz('you@xxxxxxxxxxxxxxx')
030723
0031.00
030707
0032.00 D email           S               O   Class(*Java: RPGMail)
030707
0033.00
030627
0034.00 D qCmdExc         PR                  ExtPgm('QCMDEXC')
030716
0035.00 D   cmd                        200A   Const
030716
0036.00 D   length                      15P 5 Const
030716
0037.00  /Free
030716
38.0 030716
0039.00   // Set your classpath
030707
0040.00   qCmdExc('call rpgMailCL': 14);
030716
0041.00
030707
0042.00   FROM = EPFROM;
030723
0043.00   TO = EPTO;
030723
0044.00   // Create the email java object
030716
0045.00   email = RPGMail_new();
030707
0046.00   RPGMail_addAddress(email: 'FROM': EPFROM: EPFROM);
030723
0047.00   RPGMail_addAddress(email: 'TO': EPTO: EPTO);
030723
0048.00   //RPGMail_addAddress(email: 'CC': 'ccMe@xxxxxxxxxxxxx': 'My
Name');           030722
0049.00   //RPGMail_addAddress(email: 'BCC': 'bccMe@xxxxxxxxxxxxx': 'My
Name');         030722
0050.00   //RPGMail_addAddress(email: 'REPLYTO': 'replytoMe@xxxxxxxxxxxxx':
' ');       030722
0051.00
030707
0052.00   RPGMail_setSubject(email: EPSUBJECT);
030723
0053.00
030707
0054.00   //RPGMail_setBodyFile(email: '/tmp/OrderStatus.html':
'text/html');           030722
0055.00
030716
0056.00   // This can be uncommented and will allow you to specify email
body text      030716
0057.00   // as a variable or literal.
030716
0058.00   RPGMail_setBodyText(email: EPTEXT: 'text/plain');
030723
0059.00
030707
0060.00   //RPGMail_addFileAttachment(email: '/tmp/IFSFile.xls': 'IFS.xls':
' ');       030722
0061.00
030707
0062.00   RPGMail_setSMTPHost(email: '192.0.0.175');
030722
0063.00   RPGMail_setSMTPPort(email: '25');
030707
0064.00
030707
0065.00   RPGMail_send(email);
030708
0066.00
020806
0067.00   *InLr = *On;
030626
0068.00
030716
0069.00  /End-Free
030716

 -----Original Message-----
From:   Bartell, Aaron L. (TC) [mailto:ALBartell@xxxxxxxxxxxxxx] 
Sent:   Wednesday, July 23, 2003 5:33 PM
To:     'RPG programming on the AS400 / iSeries'
Subject:        RPGMail Wrapping   was -> Catch 'n release MONITOR'd message

Thanks for the input Joe.

What are the reasons you are wrapping it?  I am asking that because I am
very dedicated to making this an easy tool to use.  Another person that has
been implementing this in their system has already started modifying my code
to include many other useful sub procs.  He has been relaying them back to
me, so I will add them to the base RPGMail code.

For instance one sub proc submitted to me was one that would allow a quick
and easy email to be sent.  For example:

RPGMail_simple('to@xxxxxxx':'from@xxxxxx':'Subject':bodyVariable:singleAttac
hment); 

That isn't exactly it, but you get the idea.  It definitely makes it easier
to send a quick email in code for errors or notification stuff.  If you can
share the code that would be great!  

Aaron Bartell




_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.