Fortinet black logo

Administration Guide

Testing the email service connection example

Testing the email service connection example

To test the email service connection:
  1. Go to System > Settings.

    In this example, we use the default Fortinet mail server (notification.fortinet.net).

  2. In the Email Service pane:
    1. In Default Reply To, enter the email address that is used to send emails.
  3. Click Apply.

    To configure alert emails, see Email alert settings.

  4. Once the email service settings have been set up, click Test Connection from the top-right.

    The Test Email Service Connectivity dialog opens.

  5. In Email To, enter an email address where the test email is sent to.
  6. Click Send.

    Once the email is successfully sent, you see the following message on the bottom-right:

    The test email looks like the following:

To test the email service connection via the CLI:
  1. In the CLI console, enter the following command:
     diagnose log alertmail test

    If the email service is correctly setup, you should receive a test email that looks like the following:

  2. If you do not receive the test email:
    1. In the CLI console, enter the following CLI commands to collect the debug logs:
        diagnose debug reset
        diagnose debug enable
        diagnose debug console timestamp enable
        diagnose debug application alertmail -1
    2. In the CLI console, enter the following CLI command to send a test email:
       diagnose log alertmail test
    3. In the CLI console, enter the following CLI commands to disable debugging:
       diagnose debug disable
       diagnose debug reset 
  3. To save the output, select Download from the top-right of the CLI window or use PuTTY to log the output.

Testing the email service connection example

To test the email service connection:
  1. Go to System > Settings.

    In this example, we use the default Fortinet mail server (notification.fortinet.net).

  2. In the Email Service pane:
    1. In Default Reply To, enter the email address that is used to send emails.
  3. Click Apply.

    To configure alert emails, see Email alert settings.

  4. Once the email service settings have been set up, click Test Connection from the top-right.

    The Test Email Service Connectivity dialog opens.

  5. In Email To, enter an email address where the test email is sent to.
  6. Click Send.

    Once the email is successfully sent, you see the following message on the bottom-right:

    The test email looks like the following:

To test the email service connection via the CLI:
  1. In the CLI console, enter the following command:
     diagnose log alertmail test

    If the email service is correctly setup, you should receive a test email that looks like the following:

  2. If you do not receive the test email:
    1. In the CLI console, enter the following CLI commands to collect the debug logs:
        diagnose debug reset
        diagnose debug enable
        diagnose debug console timestamp enable
        diagnose debug application alertmail -1
    2. In the CLI console, enter the following CLI command to send a test email:
       diagnose log alertmail test
    3. In the CLI console, enter the following CLI commands to disable debugging:
       diagnose debug disable
       diagnose debug reset 
  3. To save the output, select Download from the top-right of the CLI window or use PuTTY to log the output.