subject in do shout

Tools and several solutions to manage Control-M products
Post Reply
User avatar
rajesekhar
Nouveau
Nouveau
Posts: 72
Joined: 07 Dec 2007 12:00

subject in do shout

Post by rajesekhar » 03 Jul 2008 12:10

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

User avatar
gglau
Nouveau
Nouveau
Posts: 317
Joined: 13 Jun 2007 12:00

Post by gglau » 04 Jul 2008 4:14

With shout, message subject is the same as message body which is the shout message in job definition. Starting in version 6.3, job order ID is added in front of the message subject by default. You can turn it off by this parameter at Control-M server.

MAIL_ADD_SUBJECT_PREFIX N

User avatar
rajesekhar
Nouveau
Nouveau
Posts: 72
Joined: 07 Dec 2007 12:00

Post by rajesekhar » 07 Jul 2008 5:55

Thanks for the reply.

Is there any other way to get the specified matter in the subject and message by shout?

Or else how can I make my "D0 Mail" working?

Thanks,
Raj

User avatar
mauriziog
Nouveau
Nouveau
Posts: 807
Joined: 08 Jun 2007 12:00
Location: Varese - Italy
Contact:

Post by mauriziog » 08 Jul 2008 10:26

I dont understand:
Is there any other way to get the specified matter in the subject and message by shout?
Or else how can I make my "D0 Mail" working?
The previous question was how to remove the subject prefix.
Now which is the question/problem?

User avatar
rajesekhar
Nouveau
Nouveau
Posts: 72
Joined: 07 Dec 2007 12:00

Post by rajesekhar » 08 Jul 2008 4:23

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

User avatar
mauriziog
Nouveau
Nouveau
Posts: 807
Joined: 08 Jun 2007 12:00
Location: Varese - Italy
Contact:

Post by mauriziog » 08 Jul 2008 5:52

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.
Last edited by mauriziog on 09 Jul 2008 7:06, edited 2 times in total.

User avatar
rajesekhar
Nouveau
Nouveau
Posts: 72
Joined: 07 Dec 2007 12:00

Post by rajesekhar » 09 Jul 2008 5:16

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

User avatar
mauriziog
Nouveau
Nouveau
Posts: 807
Joined: 08 Jun 2007 12:00
Location: Varese - Italy
Contact:

Post by mauriziog » 09 Jul 2008 7:04

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
------

User avatar
rajesekhar
Nouveau
Nouveau
Posts: 72
Joined: 07 Dec 2007 12:00

Post by rajesekhar » 09 Jul 2008 7:58

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

Post Reply