|
Do you have to be at R5 Domino for this to work? What is the difference between
the send email and snddst?
rob@dekko.com on 02/04/2002 02:48:48 PM
Please respond to domino400@midrange.com
To: domino400@midrange.com
cc: (bcc: Gail L Crane/Johanson/JMC)
Subject: Re: Initiating Domino Mail using RPG
COMMAND:
/*********************************************************************/
/* DIRECTIVES- */
/* PARM TEXT('Send Email to a list') */
/* PARM PGM(EMAILLIST) */
/*********************************************************************/
CMD PROMPT('Send Email to a list')
PARM KWD(EMAILFILE) TYPE(TFILE) MIN(1) FILE(*IN) +
PROMPT('Name of Email file')
PARM KWD(SENDER) TYPE(ELEM2) SNGVAL((*NETWORK)) +
PROMPT('Sender')
PARM KWD(SUBJECT) TYPE(*CHAR) LEN(256) DFT(*NONE) +
SPCVAL((*NONE '')) EXPR(*YES) +
PROMPT('Subject')
PARM KWD(MESSAGE) TYPE(*CHAR) LEN(2048) +
DFT(*NONE) SPCVAL((*NONE '')) EXPR(*YES) +
PROMPT('Message')
TFILE: QUAL TYPE(*NAME) LEN(10) EXPR(*YES)
QUAL TYPE(*NAME) LEN(10) DFT(*LIBL) +
SPCVAL((*LIBL) (*CURLIB)) EXPR(*YES) +
PROMPT('Library')
ELEM2: ELEM TYPE(*PNAME) LEN(256) +
DFT(YOURNAME@DEKKO.COM) EXPR(*YES) +
PROMPT('E-mail address of sender')
ELEM TYPE(*CHAR) LEN(256) EXPR(*YES) PROMPT('Name +
of e-mail sender')
PROGRAM:
/* Email a list of people. */
/* */
/* */
/* Modification log: */
/* 01/14/02 by R.Berendt, CCP GDS,LLC */
/* Created */
/* */
/* */
PGM ( +
&EMAILFILE /* File/Library containing list */ +
&SENDER /* Sender of email */ +
&SUBJECT /* Subject of email */ +
&MESSAGE /* Message of email */ +
)
/*
+
| Open file containing list of system names.
+
*/
DCLF FILE(EMAILLIST)
DCL &EMAILFILE *CHAR 20 /* 1-10=File, 11-20=Library */
DCL &EMAILLIB *CHAR 10 /* Library containing list */
DCL &EMAILOBJ *CHAR 10 /* File containing list */
DCL &MESSAGE *CHAR 2048 /* Email message */
DCL &MSGTXT *CHAR 75 /* Message text */
DCL &SENDER *CHAR 513 /* Email sender */
DCL &SENDER1 *CHAR 256 /* Email sender */
DCL &SENDER2 *CHAR 255 /* Email sender description */
DCL &SUBJECT *CHAR 256 /* Email subject */
/*
+
| Parse out the file name and library name
+
*/
CHGVAR VAR(&EMAILOBJ) VALUE(%SST(&EMAILFILE 1 10))
CHGVAR VAR(&EMAILLIB) VALUE(%SST(&EMAILFILE 11 10))
/*
+
| Override to specified file
+
*/
OVRDBF FILE(EMAILLIST) TOFILE(&EMAILLIB/&EMAILOBJ) LVLCHK
(*NO)
OPNDBF FILE(EMAILLIST) OPTION(*INP) OPNID(EMAILLIST)
/*
+
| Read the file. Message CPF0864 means End-of-File
+
*/
READ: RCVF
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(EOF))
/*
+
| Display a message at the bottom of the screen informing us
+
| which recepient is currently being processed.
+
*/
CHGVAR VAR(&MSGTXT) VALUE('Now processing ' +
*BCAT &ADDRESS)
SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA(&MSGTXT) +
TOPGMQ(*EXT) MSGTYPE(*STATUS)
/*
+
| Send the email.
+
*/
CHGVAR VAR(&SENDER1) VALUE(%SST(&SENDER 3 256))
CHGVAR VAR(&SENDER2) VALUE(%SST(&SENDER 259 255))
SNDEMAIL ADDRESSEE((&ADDRESS)) SENDER(&SENDER1 &SENDER2) +
SUBJECT(&SUBJECT) MESSAGE(&MESSAGE)
GOTO CMDLBL(READ)
EOF:
/*
+
| Close the file.
+
*/
CLOF OPNID(EMAILLIST)
DLTOVR FILE(EMAILLIST)
EXIT:
ENDPGM
DSPLYT EMAILLIST
Field Start End Attrib Text
ADDRESS 1 50 A50
RUNQRY QRYFILE(EMAILLIST)
ADDRESS
rob@dekko.com
Rob Berendt
--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
Benjamin Franklin
Evan Harris
<spanner@ihug.co.n To: domino400@midrange.com
z> cc:
Sent by: Fax to:
domino400-admin@mi Subject: Re: Initiating Domino
Mail using RPG
drange.com
02/05/2002 03:03
AM
Please respond to
domino400
Rob
This is the kind of thing I was looking for. Can you just be a little more
explicit as to what you do with the file after it is created ? I'm kind of
missing something here...
Thanks
Evan Harris
>This is probably not what you want to hear. But I recommend sticking with
>the AS/400 method for flexibility sake. For example.
>
>I create a file called ALERT. One field - EMAILADR.
>I put the following records in the file:
>rob@dekko.com
>myboss@dekko.com
>2605551212@archwireless.net
_______________________________________________
This is the Lotus Domino on the iSeries / AS400 (DOMINO400) mailing list
To post a message email: DOMINO400@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/domino400
or email: DOMINO400-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/domino400.
_______________________________________________
This is the Lotus Domino on the iSeries / AS400 (DOMINO400) mailing list
To post a message email: DOMINO400@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/domino400
or email: DOMINO400-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/domino400.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.