Posted: Wed Jan 27, 2010 8:45 am Post subject: SendMail plugin in WMB 6.0 to emailoutput node in WMB7.0
Apprentice
Joined: 18 Dec 2008 Posts: 44
I would like to know what are the migration process that we need to do for migrating IBM - IA07 sendmail plugin to emailoutput node in wmb 6.1. Can someone help me out with this?
You can use IA07 directly in a 32 bit execution group, or recompile it to 64 bit, as well as changing to the new node.
This example of ESQL (when used in a prior compute node) is useful to format the Email in a similar way to the method used for the IA07 node.
Code:
-- Add recipient information to the EmailOutputHeader
SET OutputRoot.EmailOutputHeader.To = '<recipient email address>';
SET OutputRoot.EmailOutputHeader.Cc = '<recipient email address>';
SET OutputRoot.EmailOutputHeader.Bcc = '<recipient email address>';
-- Add sender information to EmailOutputHeader
SET OutputRoot.EmailOutputHeader.From = '<sender email address>';
SET OutputRoot.EmailOutputHeader."Reply-To" = '<reply email address>';
-- Add subject to EmailOutputHeader
SET OutputRoot.EmailOutputHeader.Subject = 'Replaced by ESQL compute node.';
-- Add SMTP server information to the LocalEnvironment
SET OutputLocalEnvironment.Destination.Email.SMTPServer ='<smtp.server:port>';
-- Create a new message body, which will be sent as the main text of the email.
DECLARE crlf CHAR CAST(X'0D0A' AS CHAR CCSID 1208);
DECLARE line1 CHAR 'This is my line 1';
DECLARE line2 CHAR 'This is my line 2';
DECLARE line3 CHAR 'This is my line 3';
DECLARE bodyText CHAR line1 || crlf || line2 || crlf || line3;
SET OutputRoot.BLOB.BLOB = CAST(bodyText AS BLOB CCSID 1208);
-- Note: We could also have used the XMLNSC parser to create an HTML type email message body instead like this
-- SET OutputLocalEnvironment.Destination.Email.BodyContentType ='text/html';
-- SET OutputRoot.XMLNSC.html.body.h1 = 'Hello World';
-- CREATE LASTCHILD OF OutputRoot.XMLNSC.html.body.p TYPE (XMLNSC.PCDataValue) VALUE line1;
-- CREATE LASTCHILD OF OutputRoot.XMLNSC.html.body.p NAME 'br' VALUE NULL;
-- CREATE LASTCHILD OF OutputRoot.XMLNSC.html.body.p TYPE (XMLNSC.PCDataValue) VALUE line2;
-- CREATE LASTCHILD OF OutputRoot.XMLNSC.html.body.p NAME 'br' VALUE NULL;
-- CREATE LASTCHILD OF OutputRoot.XMLNSC.html.body.p TYPE (XMLNSC.PCDataValue) VALUE line3;
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum