Automic Workload Automation

  • 1.  Send mail with option agent & login object

    Posted Jun 23, 2016 01:00 PM

    Helo,

    If my understanding is correct now in v11 we can choose between AE and another agent when we need to send an a email. 

    Syntax is:
    SEND_MAIL(Receiver, [Cc], Subject, Text, [Attachment],[Agent, Login Object] | [_SERVER, _DEFAULT])

    I have created script object with following content:
    :SET &MAIL# = SEND_MAIL("my_email_addres ",,"Subject","Text",,"KAAPP","AUTOMIC.LOGIN")

    I get the following error:
    Runtime error in object 'SCRI.NEW.1', line '00001'. Login object 'AUTOMIC.LOGIN' not found or no login information for this platform or host ('MAIL', '*').

    I have check more than once for host name KAAPP in AUTOMIC.LOGIN object. I tried them both in another script and everything works fine.

    Does anybody have idea what i'm doing wrong?

     



  • 2.  Send mail with option agent & login object

    Posted Jun 23, 2016 02:48 PM
    If you receive this message there is no login with type "MAIL" in loginobject available - as the message says :-)

    pls refer to the first entry in the docu example:
    http://docs.automic.com/documentation/AE/11.2/english/AE_WEBHELP/help.htm?product=awa#ucabds.htm



  • 3.  Send mail with option agent & login object

    Posted Jun 24, 2016 10:06 AM

    Thanks Wolfgang,

    Your help spared me a lot of time. Following your instruction, I managed to setup sending an email.

    I just have one additional question:

    If we defined credential of certain user (for example automic) in login object and select its type to be MAIL does it mean that for all jobs we always have to use that user?


  • 4.  Send mail with option agent & login object

    Posted Jun 24, 2016 11:29 AM
    I released that I can solved this problem by creating login object per user. So if I have three user I will create three login object.


  • 5.  Send mail with option agent & login object

    Posted Sep 20, 2017 11:13 AM
    FrankMuffke or @Automic,

    I did not want to open separate discussion since it is somewhat releated to this original question.

    If our SMTP/relay does not require specific account to send e-mail do you know what will be the way to define MAIL type of entry in Login object when Login Info and Password does not exists?

    Thanks,

    Vlad_Navazhylau_6186


  • 6.  Send mail with option agent & login object

    Posted Sep 20, 2017 02:29 PM
    Hmm good question...

    My (personal) Plan A would be sending it without specifying an Agent or login object.
    Plan B trying to specify type MAIL with any fake credentials (and hoping SMTP server won't check)
    Plan C trying to specify type MAIL with credentials of your (or another general) mail user for receiving mails
    Plan D trying to specify type MAIL with credentials of your OS user
    Plan E using a CALL object :-)

    good luck

    Wolfgang



  • 7.  Send mail with option agent & login object

    Posted Sep 20, 2017 02:54 PM
    FrankMuffke,

    Thank you for your feedback.

    We had originally used an option from "Plan A" as mentioned in your comment. And it worked OK for e-mails without attachments using default SERVER method (email send using random WP process, if I understand correctly).

    The issue we stumble upon is when we tried to include attachments with SEND_MAIL and having our two Automation Engines (same System) setup on two different servers caused a problem for us. The Windows Agent on the servers #1 will generate some log files that we want to e-mail as attachments but WP on server #2 actually will be handling SEND_MAIL function and it could not find the log files, since they did not exist on server #2.

    I will be testing your recommendation from Plan B and Plan C, suspecting that most likely Plan C is what we will have to use at the end to make it work.

    Another option for us will be using Action from "Email Action Pack" that will use the Agent and Java library, but this will require adding additional logic in our Workflows and removes some other flexibility of SEND_MAIL AE native function.

    https://marketplace.automic.com/details/email-action-pack

    =====
    Update 10/4/2017, "Plan C" - specify type MAIL with credentials of your (or another general) mail user for receiving mails - worked OK for us.
    =====

    Thanks,

    @Vlad Navazhylau


  • 8.  Send mail with option agent & login object

    Posted Sep 20, 2017 03:05 PM
    Vlad_Navazhylau_6186

    Thats a design issue of AE => You are not able to influence which Work Process of AE (on Server A or Server B ) will get the "task" of sending the mail with attachment, so it could be the one where the file is stored or not. Pretty a 50:50 chance... :-S

    To get rid of that you can use UNC paths (where both AE parts have access to) or copy the files on both Servers.

    I personally prefer sending the mail via powershell or mailx over a WIN or UNIX Agent....