× 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.



Keep in mind this most likely still uses the old outdated MSF/IBM SMTP
system which means if and when your mail router requires authentication,
you're out of luck.

Bradley V. Stone
BVSTools, Inc.
BVSTools - www.bvstools.com
eRPG SDK - www.erpgsdk.com

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Peter Connell
Sent: Wednesday, March 04, 2009 3:41 PM
To: RPG programming on the IBM i / System i
Subject: RE: Sending STMF through SNDDDST


Anupam,

You may not have considered that you already have Net.data which comes
with an email feature using a single built-in function named
DTW_SENDMAIL.
The only Net.data you need to know is how to enter a single one-line
statement into a source file.
The trick is that you need a little CLP that allows you to pass
parameters to and execute the source file.

Here's one I coded earlier -

/*'---------------------------------------------------------------------
- +
'
+
'This program accepts the parameters necessary to send an email
+
'using the Net.Data email function available on every iSeries.
+
'There are 2 pre-requisites.
+
'
+
'1.
+
'A pre-requisite is that the source file QGPL/INI exists with a member
+
'named DB2WWW. The member need contain only a single source line which
+
'Net.Data uses to identify the network address of the SMTP server that
+
'will be used. The source line should be coded as follows -
+
'
+
'DTW_SMTP_SERVER ex0001.corp.acme
+
'
+
'2.
+
'The source file QGPL/INI should contain another member named DTWEMAIL
+
'that contains a single source line which sends the email as follows -
+
'
+
'@dtw_sendmail(sender,recipient,message,subject,carboncopy,
+
'blindcopy,replyto,organization,attachlist,attachconvlist,mimetype)
+
'
+

'----------------------------------------------------------------------
*/

PGM PARM(&SENDER +
&RECIPIENT +
&MESSAGE +
&SUBJECT +
&CARBONCOPY +
&BLINDCOPY +
&REPLYTO +
&SENDERSORG +
&ATTACHMENT +
&CONVLIST +
&MIMETYPE)

DCL VAR(&SENDER) TYPE(*CHAR) LEN(50)
DCL VAR(&RECIPIENT) TYPE(*CHAR) LEN(3000)
DCL VAR(&MESSAGE) TYPE(*CHAR) LEN(3000)
DCL VAR(&SUBJECT) TYPE(*CHAR) LEN(50)
DCL VAR(&CARBONCOPY) TYPE(*CHAR) LEN(3000)
DCL VAR(&BLINDCOPY) TYPE(*CHAR) LEN(3000)
DCL VAR(&REPLYTO) TYPE(*CHAR) LEN(50)
DCL VAR(&SENDERSORG) TYPE(*CHAR) LEN(50)
DCL VAR(&ATTACHMENT) TYPE(*CHAR) LEN(3000)
DCL VAR(&CONVLIST) TYPE(*CHAR) LEN(100)
DCL VAR(&MIMETYPE) TYPE(*CHAR) LEN(5)
DCL VAR(&ENV) TYPE(*CHAR) LEN(16000)
DCL VAR(&CURDIR) TYPE(*CHAR) LEN(9999)
DCL VAR(&DIRLEN) TYPE(*DEC) LEN(7)
DCL VAR(&INIDIR) TYPE(*CHAR) LEN(30) +
VALUE('/QSYS.LIB/QGPL.LIB')

/*'Load parameters into QUERY_STRING */
CHGVAR &ENV ('sender=' *CAT &SENDER *TCAT +
'&recipient=' *CAT &RECIPIENT *TCAT +
'&message=' *CAT &MESSAGE *TCAT +
'&subject=' *CAT &SUBJECT *TCAT +
'&carboncopy=' *CAT &CARBONCOPY *TCAT +
'&blindcopy=' *CAT &BLINDCOPY *TCAT +
'&replyto=' *CAT &REPLYTO *TCAT +
'&organization=' *CAT &SENDERSORG *TCAT +
'&attachlist=' *CAT &ATTACHMENT *TCAT +
'&attachconvlist=' *CAT &CONVLIST *TCAT +
'&mimetype=' *CAT &MIMETYPE)
ADDENVVAR ENVVAR(QUERY_STRING) VALUE(&ENV) REPLACE(*YES)

/*'Load the path to the Net.Data email script */
CHGVAR &ENV VALUE(&INIDIR *TCAT '/INI.FILE/DTWEMAIL.MBR/MACRO')
ADDENVVAR ENVVAR(PATH_INFO) VALUE(&ENV) REPLACE(*YES)

/*'Retrieve the current directory */
RTVCURDIR RTNDIR(&CURDIR) DIRNAMLEN(&DIRLEN)

/*'Change to the directory where the INI file is located */
CHGCURDIR DIR(&INIDIR)

/*'Run Net.data */
CALL QHTTPSVR/DB2WWW

/*'Restore the current directory */
CHGCURDIR DIR(&CURDIR)

ENDPGM

Ce volia,
Peter


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
anupam.sinha@xxxxxxxxxxxxxxxxxxxxxxx
Sent: Wednesday, 4 March 2009 8:44 p.m.
To: rpg400-l@xxxxxxxxxxxx
Subject: Sending STMF through SNDDDST

Hi All,

Is there any way to send a stream file (STMF) through SNDDST command? I
need to send an email with this stream file as attachment.


Kind Regards

Anupam Sinha
--
This is the RPG programming on the IBM i / System i (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.

##################################################################
###################
This correspondence is for the named person's use only. It may
contain confidential or legally privileged information, or both.
No confidentiality or privilege is waived or lost by any
mistransmission. If you receive this correspondence in error,
please immediately delete it from your system and notify the
sender. You must not disclose, copy or rely on any part of this
correspondence if you are not the intended recipient. Any views
expressed in this message are those of the individual sender,
except where the sender expressly, and with authority, states
them to be the views of Veda Advantage. If you need assistance,
please contact Veda Advantage on either :- Australia 133124 or
New Zealand +64 9 367 6200
--
This is the RPG programming on the IBM i / System i (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.