1 Reply Latest reply on Jul 22, 2010 7:04 AM by jkhill

    sendemail syntax

    jkhill Specialist

      I'm trying to troubleshoot a problem with my new 9.0 SP1 core server (not an upgrade; we're actually still in POC).

       

      I found the Best Known Practices doc that says I should use the following manual test:

       

       

       

       

      sendemail -p alert_id=a.b.c.d -p alert_gmttime="2001-01-01 12:00:00" -- nonExtended=1 "server=smtp.example.com" "port=25" "[email protected]" "[email protected]" "subject=this is for me %T" "body=Body: %T Test %%T"

       

      I've confirmed that there's a bug in this example.  non-Extended=1 should actually be "nonExtended=1" (enclosed in double-quotes), or the test fails with errors in sendemail.log like "authentication not successful" and "smtp server negotiation failed or not set."

       

      Anyway, I have not been able to come across a definitive syntax for the sendemail utility.  Can anyone shed light on the subject?

       

      Here are my guesses about arguments, based on the example and my testing:

      • -p is used for defining runtime variables.  -p alert_id would be to define the actual event encountered (which I assume would help with %D) and -p alert_gmttime would define the timestamp.  I'm not sure how one would define the Severity (%S) or machine name (%N) but for testing it doesn't really matter.
      • Everything after "--" is substituting for a database value, and the syntax is the variable name followed by "=" followed by the value, all enclosed in double-quotes. 
      • Valid variable names are:
        • nonExtended (0 means use authentication; 1 means use anonymous)
        • server (smtp server)
        • port (almost always 25)
        • replyaddr
        • addresslist
        • subject
        • body

       

      My questions:

       

      • If I'm setting nonExtended to 0, how do I specify the userid and password. 
        • is there an argument named "user"?  I suspect there is, because if I don't specify a user field, the log reads, "2010-07-21 22:44:57(10900-10856) sendemail.exe:Authentication not successful 0 <domain> Hello [172.16.100.248] User:" but if I specify "[email protected]", the log file changes to read, "2010-07-21 22:44:35(12196-12504) sendemail.exe:Authentication not successful 0 <domain> Hello [172.16.100.248] User:[email protected]."
        • What form should the value for the user argument take?  Is it smtp address of the authenticating user, [email protected], or domain\username?
        • is there an argument named "password"?
        • is the password typed out in cleartext or does it have to be presented as a hash?
      • can I specify the authentication type I want to use? 
      • what would a valid alert_id be?  a.b.c.d doesn't seem to be working (not recognized, according to the logs) and I don't want to just cycle through number combinations until I find a valid one.

       

       

       

      Many thanks.