2 Replies Latest reply on Sep 12, 2014 7:32 AM by treyb

    Send an email via EM

    treyb Employee
      I sometimes get asked about using EM to send an email if something specific happens. For example, today with a customer, we did a computer startup condition check for the word “enumerating” in a log file which indicated to them an issue with a XenApp server. We used a custom action to send an email to their Citrix team and then stop the appropriate Citrix services so users would not be able to log into this particular server until a Citrix admin resolved the issue. It worked really well.
      Attached is the custom action config to send an email.
        • 1. Re: Send an email via EM
          BChriscoli Expert
          The problem you will have here Trey is that a decent Exchange/Mail environment wont allow just any random connection to send email. Unless the Exchange admin is willing to unsecure their mail server by adding an SMTP exception for everyone internally, it wont work by default.
          • 2. Re: Send an email via EM
            treyb Employee
            Great point Bryan. I forgot to mention the pre-req. With my customer yesterday we ran the custom action with a service account. This is important because as Bryan mentions 1 of 2 things needs to be in place to send the emails with a PowerShell custom action:

            "Send-MailMessage uses authenticated SMTP connections. By default it will use the credentials of the user executing the command. So you need to make sure you’re using an SMTP server that either:
            •           Permits that authenticated user credential to send email messages via SMTP
            •           Accepts anonymous SMTP/relay for the IP address of the sending host (you can see how to configure a relay connector for Exchange here<http://exchangeserverpro.com/how-to-configure-a-relay-connector-for-exchange-server-2010>)"