IMPORTANT NOTE: when you're about to enable, or reconfigure the error reporting via E-mail, you must contact Tera support to replicate your settings also on the Tera license server, otherwise, your error-reporting configuration will be overwritten.
In GN4, you can enable auto-reporting of system exceptions by mail. This affects all users and may slightly slow down the displaying of system errors on screen (if enabled - see Enable exceptions display and logging for GN4 applications). As an alternative to mailing exceptions, see Logging GN4 system exceptions in a local file.
In GlobalConfig uncomment the parts related to the error reporting, after comments: <!-- Error reporting: automatic report of exceptions via emails.
Enable (Boolean) True to enable the error reporting on GN4 clients (Ted4, Fred4...). When enabled, the exceptions message are sent to the Tera server via email. Default value: false
TakeSnapshot (Boolean) True to attach the screenshot image to the error reporting email. When enabled, a image of the entire screen (taken when the exception occurs) is attached to the error reporting email. This is useful to understand what user operation caused the exception. Default value: true
SenderDomain (String) The domain of the mail sender (for example: "mydomain.com"). The domain is used to generate the 'from' address of the mail, appending the domain string after the '@' character of the address: for example 'Ted4@mydomain.com', 'Shell4@mydomain.com'... If empty, the domain is retrieved from the license InstallCode of the server. Default value: empty
CCAddress (String) The carbon copies addresses as semicolon (;) separated string. It is optional. For example: "user1@domain.com;user2@domain.com" Default value: empty --> <!-- <ErrorReporting Enable="false" TakeSnapshot="true" SenderDomain="" CCAddress="" /> --> |
In GN4, you can enable auto-reporting of system exceptions by mail. Mails are sent to the email address, specified as 'toAddress' in the VB code. In the CustomShell.vb, uncomment the following code, and then set the appropriate values for: •your SMTP Server: replace "smptServer" in the code with the name of your SMTP server. Note: find the name of the SMTP server in the Outlook accounts, by double-clicking a valid POP3 account, under Outgoing mail server (SMTP). •your smpt port - if not 25. Replace 25 in the code with the actual port number. Note: find the port in the Outlook accounts, by double-clicking a valid POP3 account, clicking More settings, Advanced tab, Outgoing server (SMTP). •the user account to send mail from: replace "username" in the code with the sender name. Note: find the user name in the Outlook accounts, by double-clicking a valid POP3 account, clicking More settings, Outgoing server tab, User name. •the user password: replace "password" in the code with an appropriate password. Note: find the user name in the Outlook accounts, by double-clicking a valid POP3 account, clicking More settings, Outgoing server tab, Password. •the customer name: replace "@customer.com" with the name of the customer. Note: this is a descriptive name that will appear as sender. 'uncomment below if you want to customize the same named function that already operates in system add-in
''configure here the custom actions to do when a exception occurs 'Public Overrides Function OnException(ByVal exceptionData As String, ByVal errorCode As Integer, ByVal applicationName As String, _ ' ByVal userId As Integer, ByVal userName As String, ByVal descr As String) As Boolean ''add your code here
''uncomment the following to send a mail with the exception data ''set here the email server and credentials 'Dim smtpServer As String = "smtpServer" 'Dim port As Integer = 25 'Dim user As String = "username" 'Dim password As String = "password"
'Dim subject As String = "GN4 Notification: " + descr 'Dim body As String = exceptionData 'Dim sender As String = applicationName + "@customer.com" 'Dim toAddress As String = "errorReporting@teradp.com" 'Dim ccAddress As String = "" 'Dim takeSnapshot As Boolean = False
''note that if the takeSnapshot flag is True, then a snapshot of the 'entire' screen is attached to the mail 'SendEmail(smtpServer, port, user, password, subject, body, sender, toAddress, ccAddress, takeSnapshot)
'Return False 'ok 'End Function
Recompile add-ins and distribute them to all workstations. |
An example of the mail sent