Email Notification Examples

Email Notification configuration examples.

This topic demonstrates the email notification setup with the examples below.

  1. Notify when a transfer session is completed.

    When a transfer session is finished, an email with brief session summary is sent to "list1".

    <EMAILNOTIF>
      <MAILLISTS
        list1 ="janedoe@companyemail.com, johndoe@companyemail.com"
      />
    
      <MAILCONF 
        FROM="Aspera Notifier &lt;admin@companyemail.com&gt;"
        MAILSERVER="smtp.companyemail.com"
        BODYTEXT="%{NEWLINE}Powered by Aspera Inc."
      />
    
      <FILTER
        MAILLISTS="list1"
        SENDONSESSION="yes"
        SUBJECTPREFIX="Aspera Transfer - %{USER} "
        BODYPREFIX="Status: %{STATE}%{NEWLINE} File Count: %{FILECOUNT}"
      />
    </EMAILNOTIF>
  2. Notify when a session is initiated and completed.

    When a transfer is initiated, send a transfer notice email message. Send a summary email when finished.

    <EMAILNOTIF>
      <MAILLISTS
        list1 ="janedoe@companyemail.com, johndoe@companyemail.com"
      />
      <MAILCONF 
        FROM="Aspera Notifier &lt;admin@companyemail.com&gt;"
        MAILSERVER="smtp.companyemail.com"
        SUBJECT=" by %{USER}"
        BODYTEXT="%{NEWLINE}Powered by Aspera Inc."
      />
    
      <FILTER
        MAILLISTS="list1"
        SENDONSTART="yes"
        SENDONSTOP="no"
        SUBJECTPREFIX="Transfer Started"
        BODYPREFIX="Source: %{PEER}%{NEWLINE} Target: %{TARGET}"
      />
    
      <FILTER
        MAILLISTS="list1"
        SENDONSTART="no"
        SENDONSTOP="yes"
        SUBJECTPREFIX="Transfer Completed"
        BODYPREFIX="
          Status: %{STATE}%{NEWLINE}
          File Count: %{FILECOUNT}%{NEWLINE}
          Source: %{PEER}%{NEWLINE}
          Target: %{TARGET}%{NEWLINE}
          Bytes Transferred: %{TOTALBYTES} Bytes%{NEWLINE}
        "
      />
    </EMAILNOTIF>
  3. Send different email text for regular transfers and for Aspera Sync transfers.

    When Aspera Sync triggers a transfer (assuming only Aspera Sync uses the folder /sync-folder), an email message is sent to "mediaGroup". When a regular transfer occurs (files are sent to /upload), a different notification is sent to "mediaLead" and "adminGroup".

    <EMAILNOTIF>
      <MAILLISTS
        mediaGroup ="johndoe@companyemail.com, janedoe@companyemail.com"
        mediaLead ="janedoe@companyemail.com"
        adminGroup ="admin@companyemail.com, root@companyemail.com"
      />
    
      <MAILCONF 
        FROM="Aspera Notifier &lt;admin@companyemail.com&gt;"
        MAILSERVER="smtp.companyemail.com"
        BODYTEXT="%{NEWLINE}Powered by Aspera Inc."
      />
    
      <FILTER
        MAILLISTS="mediaGroup"
        SENDONSESSION="yes"
        DESTIP="192.168.1.10"
        TARGETDIR="/sync-folder"
        SUBJECTPREFIX="Aspera Sync #1 - From %{PEER}"
        BODYPREFIX="Status: %{STATE}%{NEWLINE} File Count: %{FILECOUNT}"
      />
    
      <FILTER
        MAILLISTS="mediaLead,adminGroup"
        SENDONSESSION="yes"
        TARGETDIR="/upload"
        SUBJECTPREFIX="Transfer - %{USER}"
        BODYPREFIX="
          Status: %{STATE}%{NEWLINE}
          Source: %{PEER}%{NEWLINE}
          File Count: %{FILECOUNT}%{NEWLINE}
          Bytes Transferred: %{TOTALBYTES} Bytes%{NEWLINE}
        "
        />
    </EMAILNOTIF>