|
Hi
Sue, hope you're doing well.
YES, I found a relatively good way to send an
email with attachment from the AS/400. It is using the QtmmSendMail
API.
I
found it on the NEWS/400 as the free code.
It is
working so, that it takes an IFS file, add MIME header and footer, and writes
back to IFS to temporary file, then calls API, which send the mail and delete
the temp file.
But be
aware, there are a few troubles -
1) the
code page problem - you need to specify the same CP in source of program
(variable AsciiCodePage), it must be the same as the CCSID parameter in CHGSMTPA
command (and when this parm will be changed, you will need to change the program
and recompile it).
2) the
non-text attachments - aren't working :o(, only text files are beeing sent
correctly
3) the
large files are divided incorrectly to more mails, so the target probably won't
be able to become the same file as was sent.
I
found the solution to the third problem, but it must not be always correct, look
at http://publib.boulder.ibm.com/pubs/html/as400/v4r4/ic2924/info/RZAIRSSV4.HTM#HDRRZAIRSSV4
(use the correct for your OS
version)
In the
attachment of this mail you will find three files, you will have to change the
libraries names in them.
CRTPGMSM pgm is CLP, which will create the main
program (SNDEMAIL_P)
You
will need to create the SNDEMAIL command with
PGM(SNDEMAIL_P)
You
will also need to have configured SMTP.
!
ENJOY !
For
any question, pls mail me back ....
("`- ' '-/")
.___..--''" ` - . _ Patrik
Timura
|
As an Amazon Associate we earn from qualifying purchases.
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.