2.4.1.49.5 Example

In this example,

- the text of the message is stored in the sysin MESSAGE,

- the implicit “From-Address” is taken into the environment variable MT_FROM_ADDRESS_MAIL,

- the “To-Address” is ”BOB” <BOB.FOSTER@USA.COM>,

- an attached document is to be sent (with ddname file CR1 and name FILE2.CSV).

m_FileAssign -i MESSAGE

text of the email

_end

m_FileAssign -d SHR CR1 ${DATA}/FPROD.FILE1

m_SendMail -t ‘”BOB” <BOB.FOSTER@USA.COM>’ -m MESSAGE -a CR1 -n ‘FILE1.CSV’