The Email service User's Guide (http://staf.sourceforge.net/current/email.html) documents that you can specify multiple TO and TEXTATTACHMENT options.
All of the binary/text attachments must reside on a single machine, so you
would need to use the FS COPY FILE request (via a <stafcmd>) to copy the
files to a single machine before submitting the <stafcmd> for the EMAIL
SEND request.
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: David Bender/Austin/IBM@IBMUS
Date: 03/15/2011 05:02 PM
Subject: RE: [staf-users] Attachment
Hi David,
The request here only take care of single email address and single text
attachment.
I have multiple email addresses and multiple text attachments on different
machines. What should the request look like?
Thanks,
Cindy
From: David Bender [mailto:[email protected]]
Sent: March-11-11 2:06 PM
To: Cindy Zhu
Cc: [email protected]
Subject: Re: [staf-users] Attachment
<?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
Inactive hide details for Cindy Zhu ---03/11/2011 02:35:27 PM---Hi, Can you
show me how to attach files to an email and send thCindy Zhu ---03/11/2011
02:35:27 PM---Hi, Can you show me how to attach files to an email and send
the email from a STAX job?
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>>
<<inline: 28960572.gif>>
<<inline: 28623302.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
