<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE stax SYSTEM "stax.dtd">
<stax>
<script>
from com.ibm.staf import STAFUtil
emailTo = '[email protected]'
emailSubject = 'This is the email subject'
emailMessage = 'This is the email message'
emailAttachmentMachine = 'attachmentMachine.domain.com' # Machine where
attachment files are located
emailTextAttachment = 'C:/STAF/bin/STAF.cfg'
emailBinaryAttachment = 'C:/temp/ia.bmp'
</script>
<defaultcall function="email_example"/>
<function name="email_example">
<sequence>
<stafcmd name="'Sending email'">
<location>'local'</location>
<service>'EMAIL'</service>
<request>
'SEND TO %s SUBJECT %s MESSAGE %s ATTACHMENTMACHINE %s
TEXTATTACHMENT %s BINARYATTACHMENT %s' \
% (emailTo, STAFUtil.wrapData(emailSubject), STAFUtil.wrapData
(emailMessage), \
STAFUtil.wrapData(emailAttachmentMachine), STAFUtil.wrapData
(emailTextAttachment),
STAFUtil.wrapData(emailBinaryAttachment))
</request>
</stafcmd>
<message log="1">'Email RC=%s, Result=%s' % (RC,
STAFResult)</message>
</sequence>
</function>
</stax>
Thanks,
David
David Bender 11501 Burnet Rd. Phone (T/L): 1-512-286-5315
STAF/STAX Development Bldg. 903-5B002 (363-5315)
Austin, TX ITN: 23635315
IBM Software Group, 78758-3400 Email: [email protected]
WPLC
From: Cindy Zhu <[email protected]>
To: "[email protected]"
<[email protected]>
Date: 03/11/2011 02:35 PM
Subject: [staf-users] Attachment
Hi,
Can you show me how to attach files to an email and send the email from a
STAX job?
Thanks,
Cindy
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
staf-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/staf-users
<<inline: graycol.gif>>
<<inline: ecblank.gif>>
------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d
_______________________________________________ staf-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/staf-users
