Defining the SMTP Server

Follow

Before You Begin   

To use Microsoft Office 365 as your SMTP server and ensure notifications are sent correctly, enable the Authenticated SMTP option in admin.microsoft.com. Click Settings | Org Settings | Modern authentication and select the Authenticated SMTP option under Allow access to basic authentication protocol.

Configure or Update the SMTP Server in JAMS

  1. Start the JAMS Client as an administrator.
  2. Click the Configuration option in the Shortcuts bar.
  3. Under the Email section, go to the SMTP Server configuration setting.
  4. Enter the name of the desired SMTP server.
    Configuration_tab.png
  5. Click Save in the Control Bar.
  6. Restart the JAMS Scheduler service to apply these changes. This will not impact any Jobs in the Schedule or any Jobs that are executing.

Configure Authentication to the SMTP Server

If you need to modify the standard port or credentials to be able to authenticate to the SMTP server, you can enable SMTP authentication through two different methods:

  • JAMS Scheduler Configuration - Edit the JAMSScheduler.exe.config file. 
    OR
  • .NET Configuration - Edit the .NET Framework Machine.config file.

NOTE: Only one of these methods should be used in an environment.



NOTE: If you are using the "Send Report as Email" Schedule Item, add the same block of code from the JAMSScheduler.exe.config listed below into the JAMSHost.exe.config, which is located by default in C:\Program Files\MVPSI\JAMS\Scheduler.

If you are not using any customizations for the SMTP server, enter the following in the common.config file, which is located by default in C:\Program Files\MVPSI\JAMS\Scheduler:
<add key="SMTPServer" value="Enter the name of the SMTP Server"/>.


JAMS Scheduler Configuration

  1. Open the JAMSScheduler.exe.config file, which is located by default in C:\Program Files\MVPSI\JAMS\Scheduler.
  2. Insert the code shown below directly before the </configuration> tag.
  3. Update it to match your environment.
      <system.net>
      <mailSettings>
      <smtp deliveryMethod="Network">
      <network defaultCredentials="false" port="25" host="your.host.name.com" enableSsl = "true" userName="me@xyzcom" password="abc123" />
      </smtp>
      </mailSettings>
      </system.net>
  4. Save the file. 
  5. Restart the JAMS Scheduler service.

For more information on additional options that can be set, see <smtp> Element Network Settings.

.NET Configuration


NOTE: Unless it is overridden, the SMTP server settings in the .NET Framework Machine.config file will also apply to all applications on the machine that use the .NET Framework SmtpClient class.


  1. Open the Machine.config file, which is located by default in C:\Windows\Microsoft.Net\Framework64\v4.0.30319\Config.
  2. Insert the code shown below directly before the </configuration> tag. 
  3. Update it to match your environment.
      <system.net>
      <mailSettings>
      <smtp deliveryMethod="Network">
      <network defaultCredentials="false" port="25" host="your.host.name.com" enableSsl = "true" userName="me@xyzcom" password="abc123" />
      </smtp>
      </mailSettings>
      </system.net>
  4. Save the file.
  5. Restart the machine.

For more information on the .NET Framework Machine configuration, see <network> Element (Network Settings.

 

Have more questions? Submit a request

Comments

  • Avatar
    Rajesh Venkatraman

    office 365 smtp service needs authentication. What is the best method to store the credentials?

  • Avatar
    Gennaro Piccolo

    Hello Rajesh,

    As shown in the example above, the credentials need to be stored in the configuration file.
    They need to reside in the JAMSScheduler.exe.config or in machine.config.
    If those credentials need to be secured, I would limit access to either of those files to specific groups or users in Active Directory so that users cannot access those files specifically. Microsoft does not provide a secure way to store those credentials for authentication to the SMTP server.

  • Avatar
    swilliams

    Just to add to your walk through, you need to add enableSsl="true" and replace port="25" with port="587" and make sure that the from address is the same as your smtp credentials in order for o365 to work.

  • Avatar
    Gerhard Schraml

    Hi,
    how can I configure 2 different SMTP credentials? Adding a second element to machine.config did not work.
    KR, Gerhard

  • Avatar
    Gennaro Piccolo

    Hello Gerhard,

    The configuration file only allows for one user account to be used for sending email from JAMS. It is not possible to configure two separate SMTP accounts to send email.

  • Avatar
    Gerhard Schraml

    Hi Gennaro,
    what a pity. Are there any plans on providing a SendMail activity supporting JAMS Credentials+Connections? That would solve the current problem and more importantly, it would finally eliminate the need to store unencrypted SMTP passwords in configuration files, which is a significant security risk.

  • Avatar
    Gennaro Piccolo

    Hello Gerhard,
    I'm not aware of any plans to support SMTP connections using the connection store for notifications.
    I think that would be a great suggestion for an enhancement request. Please contact our support team to have them show you how to submit a forman enhnacement request for your SMTP connection suggestion.