Home : Products : Hach WIMS : Email Gateway : Documentation : Email Gateway General Overview
Q12003 - INFO: Email Gateway General Overview

The Hach WIMS's Email Gateway is the background Windows Service that outputs all Hach WIMS emails to the provided SMTP server. Only one instance of the Email Gateway is required for each Hach WIMS database.  The Email Gateway works with the GNR server to generate and output reports via email.

INI Settings:

There are several settings for the Email Gateway which it loads from an INI file, the first group of settings is explained in the Hach WIMS Database Connection Settings article.  That article explains the basic settings required for all Hach WIMS Services and applications that connect directly to the Hach WIMS database.  To add to those settings, Email Gateway requires a few extra settings, explained here:

SMTP
(Required)

Sets the IP address (i.e., 192.168.0.15) or domain address (mailhost.domain.com) of the SMTP server to be used for relaying email messages.  

SMTPPORT
(Required)

Sets the network TCP/IP Port that the SMTP server is listening on. By default, this is 25; however, check with an IT staff or administrator to verify the port used on the SMTP server. 

SMTPCDO
(Optional, Default = 0FF)

Used to turn on or off the SMPT Technique used for Email Gateway. In OFF mode the service uses IPWorks SMTP (no support for SSL). When set to ON, the service will use Microsoft CDO SMTP (which allows emailing thru accounts like Gmail, Yahoo, etc).

The following are needed for the CDO techinque to support SSL:

  • SMTPCDO=ON
  • SMPTAUTH=1
  • SMTPUSER=(a user account @gmail.com, @yahoo.com, @aim.com, or @hotmail.com)
  • SMPTPASSWORD= (the password associated with the account in SMTPUSER)

See example email_gw.ini files for specific settings for each online SMTP service, such as GMAIL, YAHOO, etc.  NOTE: SMTPCDO setting of YES, 1, or TRUE is the same as setting to ON.  

SMTPAUTH
(Optional, Default = 0)

Used to turn on or off the SMPT Authentication protocols, if this is required by your IT department or other SMTP service provider. 

SMTPUSER
(Optional, Default = )

The username to be used when logging into an SMTP server that required SMTP Authentication 

SMTPPASSWORD
(Optional, Default =)

The password required for SMTP Authentication. 

MAILFROM
(Optional)

The default "From" address to send emails out from.

FORCEMAILFROM
(Optional, Default = 0)

When FORCEMAILFROM=1, all outgoing email will have the "From" address set to the MAILFROM setting's value.

SMTPCONNECTATTEMPTS
(Optional, Default =50)

Sets the number of times that the Email Gateway will attempt to connect to the given SMTP server before giving up and shutting down. 

MESSAGERELAYATTEMPTS
(Optional, Default =10 )

Sets the number of times the Email Gateway will attempt to send each message.  If it fails more times, it will give up on the failed email. Possible values are 1 to 100. 

KEEPLOGSFOR
(Optional, Default =1000)

Determines the number of days that the Gateway will keep its own log files.  Once a log file is older than the specified number of days, it is deleted from the system.

HACHWIMS_USERMSG_SENDTO
(Optional)

Use one (or more) line(s) of this setting to limit the amount of users that will be receiving routine notification messages from the service. For Example,

HACHWIMS_USERMSG_SENDTO=SUPER
HACHWIMS_USERMSG_SENDTO=SMITH
HACHWIMS_USERMSG_SENDTO=JANEDOE

would only send notification messages to SUPER, SMITH, and JANEDOE users.

USE_VB6_LICENSING
(Optional, Default=0)

Specifies how WIMS verifies the license file.  If the setting =0, WIMS will use .net dll to verify license info.  If the setting =1, WIMS uses and alternate licensing class to verify the licence info.  This setting is helpful in certain secure environments. If you are getting the following error when running the client: Could not initialize license information! Error reported: Please call OPS Systems for assistance!, you will need to added USE_VB6_LICENSING=1 to the email_gw.ini.

All of the settings are found in the Email Gateway's ini file: email_gw.ini.  This file is found in the Email Gateway installation folder which is specified during installation (default: C:\HachWIMS\EmailGateway).  If any of the settings needs to be changed in the INI file, you must save the changes to the file and then restart the Email Gateway service: see "MAINTENANCE" below for details.

MAINTENANCE:

Periodically, due to unforseen circumstances, the Gateway service can require restarting and even updating.  To start, stop or restart the service, we recommend using the provided links in the Windows Start Menu as show below:

NOTE (For Windows Vista Users): If you are running Microsoft's Windows Vista and are having trouble using the above Start menu shortcuts, please see HOWTO: Start/Stop/Restart Hach WIMS Services under Windows Vista.

For advanced users, this can also be done through the Windows Service Manager (Start, Run, services.msc, OK).  From this window, you can check the status of the service (started or not) and start, stop and restart the service:

ADVANCED USERS: 

The service must be stopped before installing an updated version of the Email Gateway.  This prevents the service from being abruptly halted during an operation by the upgrade process.  Once the upgraded version is installed, see the above maintenance section on how to ensure that your Email Gateway is operational and how to start or restart it if necessary.

 

EXAMPLES:

The following examples are for the email_gw.ini file:

  • OFFICE 365 - uses SSL and therefore needs SMTPCDO=ON (We suggest that you have a generic email account that you can run the service through)
     
    HACHWIMS_CONNECTION_DBTYPE=2
    HACHWIMS_CONNECTION_PROVIDER=SQLNCLI11
    HACHWIMS_CONNECTION_DATASOURCE=(LOCAL)\OPSSQL
    KEEPLOGSFOR=30
    SMTP=smtp.office365.com
    SMTPPORT=25
    SMTPCDO=ON
    SMTPAUTH=1
    SMTPUSER=user@email.org
    SMTPPASSWORD=Password
    MAILFROM=user@email.org
    FORCEMAILFROM=1
    STMPCONNECTATTEMPTS=1
    MESSAGERELAYATTEMPTS=3
    HACHWIMS_USERMSG_SENDTO=
  • GMAIL - uses SSL and therefore needs SMTPCDO=ON.  See Enable GMAIL App Password with Two Factor Authenitcation Enabled for setting up GMAIL with WIMS.

    HACHWIMS_CONNECTION_DBTYPE=2
    HACHWIMS_CONNECTION_PROVIDER=SQLNCLI11
    HACHWIMS_CONNECTION_DATASOURCE=(LOCAL)\OPSSQL
    SMTP=smtp.gmail.com
    SMTPPORT=465
    SMTPCDO=ON
    SMTPAUTH=1
    SMTPUSER=user@gmail.com
    SMTPPASSWORD=myPassword
    MAILFROM=
    FORCEMAILFROM=0
    STMPCONNECTATTEMPTS=1
    MESSAGERELAYATTEMPTS=3
    KEEPLOGSFOR=30
    HACHWIMS_USERMSG_SENDTO=


  • YAHOO - uses SSL and therefore needs SMTPCDO=ON

    HACHWIMS_CONNECTION_DBTYPE=2
    HACHWIMS_CONNECTION_PROVIDER=SQLNCLI11
    HACHWIMS_CONNECTION_DATASOURCE=(LOCAL)\OPSSQL
    SMTP=smtp.mail.yahoo.com
    SMTPPORT=465
    SMTPCDO=ON
    SMTPAUTH=1
    SMTPUSER=user@yahoo.com
    SMTPPASSWORD=myPassword
    MAILFROM=
    FORCEMAILFROM=0
    STMPCONNECTATTEMPTS=1
    MESSAGERELAYATTEMPTS=3
    KEEPLOGSFOR=30
    HACHWIMS_USERMSG_SENDTO=

  • AIM - uses SSL and therefore needs SMTPCDO=ON

    HACHWIMS_CONNECTION_DBTYPE=2
    HACHWIMS_CONNECTION_PROVIDER=SQLNCLI11
    HACHWIMS_CONNECTION_DATASOURCE=(LOCAL)\OPSSQL
    SMTP=smtp.aim.com
    SMTPPORT=587
    SMTPCDO=ON
    SMTPAUTH=1
    SMTPUSER=user@aim.com
    SMTPPASSWORD=myPassword
    MAILFROM=
    FORCEMAILFROM=0
    STMPCONNECTATTEMPTS=1
    MESSAGERELAYATTEMPTS=3
    KEEPLOGSFOR=30
    HACHWIMS_USERMSG_SENDTO=

  • Hotmail Live - uses SSL and therefore needs SMTPCDO=ON

    HACHWIMS_CONNECTION_DBTYPE=2
    HACHWIMS_CONNECTION_PROVIDER=SQLNCLI11
    HACHWIMS_CONNECTION_DATASOURCE=(LOCAL)\OPSSQL
    SMTP=smtp.live.com
    SMTPPORT=587
    SMTPCDO=ON
    SMTPAUTH=1
    SMTPUSER=user@hotmail.com
    SMTPPASSWORD=myPassword
    MAILFROM=
    FORCEMAILFROM=0
    STMPCONNECTATTEMPTS=1
    MESSAGERELAYATTEMPTS=3
    KEEPLOGSFOR=30
    HACHWIMS_USERMSG_SENDTO=

  • MS Exchange Server - uses internal exchange server, does not require SSL and user authorization is not required (i.e. the IP of the email gateway computer is "white listed" for relaying in the MS Exchnage Server.

    HACHWIMS_CONNECTION_DBTYPE=2
    HACHWIMS_CONNECTION_PROVIDER=SQLNCLI11
    HACHWIMS_CONNECTION_DATASOURCE=(LOCAL)\OPSSQL
    SMTP=localhost.com
    SMTPPORT=25
    SMTPCDO=NO
    SMTPAUTH=0
    SMTPUSER=
    SMTPPASSWORD=
    MAILFROM=
    FORCEMAILFROM=0
    STMPCONNECTATTEMPTS=1
    MESSAGERELAYATTEMPTS=3
    KEEPLOGSFOR=30
    HACHWIMS_USERMSG_SENDTO=
Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 2/4/2009 11:07 AM.
Last Modified on 5/13/2022 2:38 PM.
Last Modified by Scott Dorner.
Article has been viewed 11988 times.
Rated 8 out of 10 based on 6 votes.
Print Article
Email Article