Email Output Node in Compute Node :
Set mail configuration Dynamically :
SET OutputRoot.EmailOutputHeader.To = ' ';
SET OutputRoot.EmailOutputHeader.Cc = ' ';
SET OutputRoot.EmailOutputHeader.Bcc = ' ';
SET OutputRoot.EmailOutputHeader.From =' ';
SET OutputRoot.EmailOutputHeader."Reply-To" = ' ';
SET OutputLocalEnvironment.Destination.Email.SMTPServer ='<smtp.server:port>';
SET OutputRoot.EmailOutputHeader.Subject = ' ';
SET OutputLocalEnvironment.Destination.Email.BodyContentType = 'text/plain';
Email Attachment:
SET OutputLocalEnvironment.Destination.Email.Attachment.Content = ' ';
SET OutputLocalEnvironment.Destination.Email.Attachment.ContentName = ' ';
SET OutputLocalEnvironment.Destination.Email.Attachment.ContentType = 'text/xml';
SET OutputLocalEnvironment.Destination.Email.Attachment.ContentEncoding = '7bit';
SET OutputLocalEnvironment.Destination.Email.MultiPartContentType = 'mixed';
If you wanted to add HTML in the message Body you should use below code :
-- Create a new message body, which will be sent as the main text of the email.
DECLARE cReedamMsgBody CHARACTER;
--When we use concatenate symbol in between the html text, You can assign Dynamic variable right there in middle of the text.
But the assigned variable should be Character, It will not accept integer values in that.
SET cReedamMsgBody = '<body><h1>Dear ' ||rEnv.UserName||' </h1>
<h2>Thanks for Shopping at e-Commerce Online Portal</h2>
<h3>Your Payback Account has been credited with '||cDBVALUE||' points </h3>
<h4>Your Total Payback Account balance is '||mailtotal||' points </h4>
<p>Regards</p>
<p>Payback Admin Team</p>
</body>' ;
-- We have to cast the above body as a BLOB and send to email.
SET OutputRoot.BLOB.BLOB = CAST(cReedamMsgBody AS BLOB CCSID 1208);
Email Output Node Commands:
mqsicreateconfigurableservice IIB10NODE –c SMTP –o MYEMAILSERVER
mqsichangeproperties IIB10NODE –c SMTP –o MYEMAILSERVER –n serverName –v smtpout.secureserver.net:25
mqsisetdbparms IIB10NODE -n smtp::EmailIdentity –u username -p password
mqsichangeproperties IIB10NODE –c SMTP –o MYEMAILSERVER –n securityIdentity –v EmailIdentity
mqsistop ESS_NODE
mqsistart ESS_NODE
--------
Very soon i will cover the above scenarios with Java Compute Node.
Set mail configuration Dynamically :
SET OutputRoot.EmailOutputHeader.To = ' ';
SET OutputRoot.EmailOutputHeader.Cc = ' ';
SET OutputRoot.EmailOutputHeader.Bcc = ' ';
SET OutputRoot.EmailOutputHeader.From =' ';
SET OutputRoot.EmailOutputHeader."Reply-To" = ' ';
SET OutputLocalEnvironment.Destination.Email.SMTPServer ='<smtp.server:port>';
SET OutputRoot.EmailOutputHeader.Subject = ' ';
SET OutputLocalEnvironment.Destination.Email.BodyContentType = 'text/plain';
Email Attachment:
SET OutputLocalEnvironment.Destination.Email.Attachment.Content = ' ';
SET OutputLocalEnvironment.Destination.Email.Attachment.ContentName = ' ';
SET OutputLocalEnvironment.Destination.Email.Attachment.ContentType = 'text/xml';
SET OutputLocalEnvironment.Destination.Email.Attachment.ContentEncoding = '7bit';
SET OutputLocalEnvironment.Destination.Email.MultiPartContentType = 'mixed';
If you wanted to add HTML in the message Body you should use below code :
-- Create a new message body, which will be sent as the main text of the email.
DECLARE cReedamMsgBody CHARACTER;
--When we use concatenate symbol in between the html text, You can assign Dynamic variable right there in middle of the text.
But the assigned variable should be Character, It will not accept integer values in that.
SET cReedamMsgBody = '<body><h1>Dear ' ||rEnv.UserName||' </h1>
<h2>Thanks for Shopping at e-Commerce Online Portal</h2>
<h3>Your Payback Account has been credited with '||cDBVALUE||' points </h3>
<h4>Your Total Payback Account balance is '||mailtotal||' points </h4>
<p>Regards</p>
<p>Payback Admin Team</p>
</body>' ;
-- We have to cast the above body as a BLOB and send to email.
SET OutputRoot.BLOB.BLOB = CAST(cReedamMsgBody AS BLOB CCSID 1208);
Email Output Node Commands:
mqsicreateconfigurableservice IIB10NODE –c SMTP –o MYEMAILSERVER
mqsichangeproperties IIB10NODE –c SMTP –o MYEMAILSERVER –n serverName –v smtpout.secureserver.net:25
mqsisetdbparms IIB10NODE -n smtp::EmailIdentity –u username -p password
mqsichangeproperties IIB10NODE –c SMTP –o MYEMAILSERVER –n securityIdentity –v EmailIdentity
mqsistop ESS_NODE
mqsistart ESS_NODE
--------
Very soon i will cover the above scenarios with Java Compute Node.