View All Blog Posts

Sending Email Message in Project Automation

How to use project automation to send an email at the end of a synchronisation.

We have added a helper function in the Project Automation base class for sending email messages, you can now simply call the SendEmail method to send an email at the end of the sync. (The SendEmail is a wrapper around the .NET SmtpClient in System.Net.Mail).

public override void End(ProjectAutomationResult result)
    {
        SendEmail("support@simego.com", "Test Send", "Testing Send");
    }

The are several method overrides that also allow you to add attachments to your email messages.

The SMTP Server settings can either be supplied inline or via the Project Properties, if your running under Ouvvi the SMTP Settings will be read via the Values Store Service so make sure you point it to your Ouvvi Tenant.

If your using project properties for the SMTP Server details use the following property names :

  • SMTPServer

  • SMTPPort

  • SMTPUseSSL

  • SMTPUsername

  • SMTPPassword

If you use the project properties and your running under Ouvvi, Ouvvi will automatically update them from the Ouvvi configuration Database at runtime.

| Wednesday, June 1, 2016 |