I have to send an email when a job fails,
I created a shout destination table wit destination as "M" and address as "S" and logical name as "mailraj" and physical name as my mail address.
In the post parameters, I did
When = NOTK
To=mialraj
subject=%%jobname has failed. please look inot it.
I am getting the email but in the subject it says as:
"Control-M Server: Shout by orderno: 000038l0 test_job has failed. please look inot it"
and the message as :
test_job has failed. please look inot it
How can I modify the subject?
I tried in the steps tab also, getting the same reply.
And I tried DO MAIL in steps tab but its not sending any email but in the log it says "shout to mailraj performed"
I dont understand its wierd behaviour?
What could be the possible reason? Has anyone faced such problem?
Thanks,
Raj
subject in do shout
- rajesekhar
- Nouveau
- Posts: 72
- Joined: 07 Dec 2007 12:00
- rajesekhar
- Nouveau
- Posts: 72
- Joined: 07 Dec 2007 12:00
I have two questions
1)DO SHOUT : its working but the problem is with the subject
2)DO MAIL: Its not at all working
If "DO MAIL" is working then I can control the "subject" and dont need to use the "DO SHOUT"
On the whole, I have to send an email(with proper subject and message) if some job fails.
Hope, now you understand it.
Thanks,
Raj
1)DO SHOUT : its working but the problem is with the subject
2)DO MAIL: Its not at all working
If "DO MAIL" is working then I can control the "subject" and dont need to use the "DO SHOUT"
On the whole, I have to send an email(with proper subject and message) if some job fails.
Hope, now you understand it.
Thanks,
Raj
With the do_mail the subject you obtain is like this:
Control-M Server: Shout by orderno: 00002zfj Errore esecuzione NCon
where
"Control-M Server: Shout by orderno:" is the prefix
"Errore esecuzione NCon" is the message.
The do_mail sometimes not work:
can be:
1) the e-mail address
2) the smtp server that is not a RELAY server
3) there is a firewall (like Mc afee) that cut the sendind of the e-mail from a program that it dont know.
4) is a timeout problem, infact there is a default timeout that can be modifid basing on the log.
If you exclude the first two errors can be for 3) or other reasons.
In this case you must:
- activate the debug level
- send a do_mail
- deactivate debug level
- read the log generated.
Control-M Server: Shout by orderno: 00002zfj Errore esecuzione NCon
where
"Control-M Server: Shout by orderno:" is the prefix
"Errore esecuzione NCon" is the message.
The do_mail sometimes not work:
can be:
1) the e-mail address
2) the smtp server that is not a RELAY server
3) there is a firewall (like Mc afee) that cut the sendind of the e-mail from a program that it dont know.
4) is a timeout problem, infact there is a default timeout that can be modifid basing on the log.
If you exclude the first two errors can be for 3) or other reasons.
In this case you must:
- activate the debug level
- send a do_mail
- deactivate debug level
- read the log generated.
Last edited by mauriziog on 09 Jul 2008 7:06, edited 2 times in total.
- rajesekhar
- Nouveau
- Posts: 72
- Joined: 07 Dec 2007 12:00
The DO EMAIL is working after I have added our server name to relay server in SMTP parameters and then shutting and restarting the CTM server.
But I have found out that we cannot use Auto edit variables in the subject of DO EMAIL. Like, %%JOBNAME. will not be resolved in the subject.
Anyways, thanks a lot.
Raj
But I have found out that we cannot use Auto edit variables in the subject of DO EMAIL. Like, %%JOBNAME. will not be resolved in the subject.
Anyways, thanks a lot.
Raj
Your relay SMTP server wasnt configured, so I dont understand how you have send a e-mail with the prefix in the subject as reported in the first message at the beginning of the topic. You have confusing me, but doesnt matter now.
Subject and variables:
From the documentation about "do_mail" subject field:
------
An AutoEdit variable or expression cannot be
specified as all or part of the value for this parameter
------
Subject and variables:
From the documentation about "do_mail" subject field:
------
An AutoEdit variable or expression cannot be
specified as all or part of the value for this parameter
------
- rajesekhar
- Nouveau
- Posts: 72
- Joined: 07 Dec 2007 12:00
yeah, actually, I tried for DO MAIL and DO SHOUT without specifying the Relay server name. Both of them didnt work. Then I tried after pecifying the Realy server name. The DO SHOUT is working. But the DO MAIL is still not working because in the DO MAIL I am specifying the destination as logical name intseatd of a MAIL ID.
Now I gave a mail ID instead of logical name, then it worked. I thought of not confusing you but confused you. sorry about the confusion.
Maurizog, you are a very keen observer and follow each and every poin in all the questions. I appreciate it. Keep it up.
Raj
Now I gave a mail ID instead of logical name, then it worked. I thought of not confusing you but confused you. sorry about the confusion.
Maurizog, you are a very keen observer and follow each and every poin in all the questions. I appreciate it. Keep it up.
Raj