Error in mail notification activity

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
snt_ds
Premium Member
Premium Member
Posts: 280
Joined: Wed Oct 18, 2006 11:53 am
Location: Pune, India

Error in mail notification activity

Post by snt_ds »

Hi Dsxians,

I am trying to send email using notification activity stage where i am getting a message as below and email not being sent

*** Output from command was: ***
No recipient addresses found in header

I had given all the parameters of this stage.smtpservername,fromaddress,toaddress,subject etc.

Could you please let me know any pre configuration setup to use this functionality.

Thanks
snt_ds
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

There is no "pre-configuration setup" needed, assuming you can "sendmail" from the server. UNIX doesn't use the "SMTP Server" attribute so you can stop worrying about that, however it does require a "Senders" and "Recipients" email address. So...

Are you sure both have values in them? Are you using job parameters for them? If so, have you verified they are spelled correctly? Use the ellipsis / three dot "External Parameter Helper" to be certain.
-craig

"You can never have too many knives" -- Logan Nine Fingers
snt_ds
Premium Member
Premium Member
Posts: 280
Joined: Wed Oct 18, 2006 11:53 am
Location: Pune, India

Post by snt_ds »

Hi,

Thanks for the reply chulett

I am hardcoding servername,from and to address.Getting the message

like below and mail is not sending

Executed command: /ETL_PROJECTS/SMM/sendmail_S_EDMFxInterface_151423_27682.sh
*** Output from command was: ***
No recipient addresses found in header

If anyone faced this kind of issue,Please let me know your comments.

Thanks
snt_ds
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Can you still find the .sh shell script mentioned above after the failure? If so, can you post the contents wrapped in

Code: Select all

 tags?
-craig

"You can never have too many knives" -- Logan Nine Fingers
snt_ds
Premium Member
Premium Member
Posts: 280
Joined: Wed Oct 18, 2006 11:53 am
Location: Pune, India

Post by snt_ds »

Thanks chulet for your reply.

I couldn't find the .sh file in the mentioned path.I think it gets deleted after the excecution.

Could you please let me know any ways to capture this file contents.

Thanks
snt_ds
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It does get deleted normally, was hoping it might not have with the failure. Add this line to top of your "dssendmail_template.txt" file in the job's project:

cat sendmail_*.sh

This will capture the generated contents into the job's log. Don't forget to remove the line when we're done.
-craig

"You can never have too many knives" -- Logan Nine Fingers
snt_ds
Premium Member
Premium Member
Posts: 280
Joined: Wed Oct 18, 2006 11:53 am
Location: Pune, India

Post by snt_ds »

Thanks chulett for your reply

Please find the output generated.

*** Output from command was: ***
#! /bin/sh
cat sendmail_*.sh
/usr/sbin/sendmail -t -i<<////

From: sherin.mathew@pioneerinvestments.com

To: sherin.mathew@pioneerinvestments.com

Subject: Reject files from FX Rate Interfaces.

Server: boswaphb1.global.pioneer.com


Hi ,

This is to test mail functionality

Thanks

////
No recipient addresses found in header

-----------------------------------------------------------------------------------
Few days back I could be able to send mails from my unix box using mailx command.but now this is also not working.

I will remove the cat command from template file.

Thanks for your time.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Then something changed a few days back, probably a SysAdmin / UNIX change. Can you use 'sendmail' from the command line outside of DataStage? I'd suggest you take this problem and the text you just posted to your System Administrators and ask them for their help.
-craig

"You can never have too many knives" -- Logan Nine Fingers
snt_ds
Premium Member
Premium Member
Posts: 280
Joined: Wed Oct 18, 2006 11:53 am
Location: Pune, India

Post by snt_ds »

Hi chulett,

Thanks for you reply.

I went to sysadmins,but they couldn't figure it out.

I tried sendmail outside datastage.

sendmail -t sherin.mathew@pioneerinvestments.com sherin.mathew@pioneerinvestments.com "HI"
testing
EOT

I am getting below message.

/export/home/smathew/dead.letter... Saved message in /export/home/smathew/dead.letter

Coul you please let me know the given parameter is correct for sendmail?

Thanks
snt_ds
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:? Correct your syntax to match what DataStage is doing. The "-t" option tells sendmail to look for the "to:" line in the contents rather than take it from the command line like you are trying to do and, since it couldn't find it, that sent it straight out to pasture on the deal letter farm.

Follow the directions here to build a file with the keywords (etc) in it and then execute sendmail, redirecting the contents of the file to it:

http://www.kangry.com/topics/viewcomment.php?index=427

See what that does.
-craig

"You can never have too many knives" -- Logan Nine Fingers
snt_ds
Premium Member
Premium Member
Posts: 280
Joined: Wed Oct 18, 2006 11:53 am
Location: Pune, India

Post by snt_ds »

Thanks for you help chulett.I will test this and post the results.
snt_ds
Premium Member
Premium Member
Posts: 280
Joined: Wed Oct 18, 2006 11:53 am
Location: Pune, India

Post by snt_ds »

Hi chulett,

I could resolve this issue after changing dssendmail_template.txt

Removed -i option in sendmail

#! /bin/sh
/usr/sbin/sendmail -t -i<<////

changed to

#! /bin/sh
/usr/sbin/sendmail -t <<////

i have got one more question regarding multiple file attachments.I can send
email with single attachments but not with multiple attachments.

I am giving filenames in double quotes with full path seperated by comma's as mentioned in the designer guide.

syntax

"/ETL/reject/REJ_SID_SH_20081114_085951.txt","/ETL/reject/REJ_EID_SH_20081114_085951.txt"

But sequence job is throwing below warning.

Cannot open attachment file '"/ETL/reject/REJ_EID_SH_20081114_085951.txt"'

Am i missing something?Please let me know your comments.

Thanks for your time.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Try it without the quotes, or with the quotes around the entire list not each individual filename. One of the two should work, I would think.
-craig

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