Can't send an email with the Notification activity

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
abdelrahman82
Participant
Posts: 2
Joined: Wed Jan 17, 2018 4:22 pm

Can't send an email with the Notification activity

Post by abdelrahman82 »

Hi

I am trying to send an email with the notification activity.
Although I filled all the fields in the Notification activity I got the
the following error:


SMTPMail Opening connection to smtp.mail.yahoo.com...
SMTPMail RCV: 220 smtp.mail.yahoo.com ESMTP ready
SMTPMail RCV: 250 smtp.mail.yahoo.com
SMTPMail RCV: 530 5.7.1 Authentication required

Please check any paths in the following command file are correct, and if necessary adjust the 'dssendmail_template.txt' file in the project directory.
abdelrahman82
Participant
Posts: 2
Joined: Wed Jan 17, 2018 4:22 pm

Re: not able to send an email with the notification activity

Post by abdelrahman82 »

any recommendation plz

below is the file contents of dssendmail_template.txt

*** This template file is used by the BASIC routine DSSendMail() to decide
*** how to call the local command-line program that actually sends mail.
*
* (Actually, 2 file names are recognized, to allow for local customization that
* survives a DataStage re-install. This basic template file will be used -
* named "dssendmail_template.txt" ,unless a file named just "dssendmail.txt"
* is present, when that is used instead.)
*
* The file can have up to 2 sections:
* 1. File section (optional)
* Declares what lines are to be created in a temporary file to pass to the command.
* Declared by the presence of <file> and </file> lines. If these are present,
* all lines between them are token-expanded, then written out to a temporary
* file in the current directory, whose name is generated from the current
* job name (to avoid clashes).
* 2. Command section (mandatory)
* Defines exactly what command is to be run.
* All lines of the template outside of <file> and </file>, and not including
* any comment lines (starting with * or /*) are token-expanded, then written
* out to a separate temporary file, which is then executed. Note that any
* %file% token is substituted with the name used for section 1.
*
* Tokens are recognized in the template, as follows:
* %from%, %to%, %server%, will be substituted from the DSSendMail routine parameters
* %subject%, %body% ditto
* (Note that any attached files passed to DSSendMail will
* be encoded into the body and so don't appear here.
* DSSendMail also inserts any necessary blank line at the
* start of text, so the template does not need to specify it.)
* %report%, replaced by report on current job
* %file% replaced by name of temporary file created in the
* <file> section, which must exist (command section only)
* %dsdir% will be replaced with the full path of the
* DataStage Server Engine installation directory.
*
* On Windows NT to run "dssmtpmail.exe", the template looks like this:
<file>
From: hussini82@yahoo.com
To: hussini82@yahoo.com
Subject: Hi ya
Server: smtp.mail.yahoo.com
</file>
%dsdir%\bin\dssmtpmail.exe -file %file%
*
* On Windows NT to run "sendmail.exe", the template might look like this:
<file>
test
</file>
%dsdir%\bin\sendmail.exe -f hussini82@yahoo.com -t hussini82@yahoo.com -s Hi ya -b %file% -m smtp.mail.yahoo.com
*
* On Windows NT to run "blat.exe", it might look like this:
* <file>
* %body%
* </file>
* blat.exe %file% -raw -f %from% -t %to% -s "%subject%" -server %server%
*
* On UNIX to run sendmail, the template might look like this (doesn't require a <file> section):
* #! /bin/sh
* /usr/lib/sendmail -t <<////
* From: %from%
* To: %to%
* Subject: %subject%
* %body%
* ////
UCDI
Premium Member
Premium Member
Posts: 383
Joined: Mon Mar 21, 2016 2:00 pm

Post by UCDI »

DataStage should have a setting somewhere on the server side on what to do for outgoing email. That appears to be set up incorrectly. Once that is configured, DataStage will use that email as outgoing email targeting the address you supply in the email send stage.

You can bypass a lot of the aggravation by using a sequence job's run command stage to send email, or you can write like a dumb C program that can call the "system" command to kick off an email, using the console 'mail' commands. The C version can be called in parallel jobs and is highly recommended to supply that missing functionality.

This assumes your system has a working mail command line.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

UCDI wrote:This assumes your system has a working mail command line.
Right, that would be the first thing to verify... can you in fact send email from the command line of your ETL server?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply