This page provides example settings for how to configure email functionality within OpenClinica.

OpenClinica can work with several different email server configurations. Some of the most common configurations are below. These configurations have been tested and are known to work with OpenClinica 3.1.2.

SMTP Relay (no user authentication)

mailHost=IPHOSTNAME OF YOUR E-MAIL SERVER
mailPort=25
mailProtocol=smtp
mailUsername=
mailPassword=
mailSmtpAuth=false
mailSmtpStarttls.enable=false
mailSmtpsAuth=false
mailSmtpsStarttls.enable=false
mailSmtpConnectionTimeout=1000
mailErrorMsg=developers@openclinica.com

SMTP Relay (user authentication) 

mailHost=IPHOSTNAME OF YOUR E-MAIL SERVER
mailPort=25
mailProtocol=smtp
mailUsername=USERNAME
mailPassword=PASSWORD
mailSmtpAuth=true
mailSmtpStarttls.enable=false
mailSmtpsAuth=false
mailSmtpsStarttls.enable=false
mailSmtpConnectionTimeout=1000
mailErrorMsg=developers@openclinica.com

SMTP SSL – GMAIL

mailHost=smtp.gmail.com
mailPort=465
mailProtocol=smtps
mailUsername=USERNAME@gmail.com
mailPassword=PASSWORD
mailSmtpAuth=false
mailSmtpStarttls.enable=false
mailSmtpsAuth=true
mailSmtpsStarttls.enable=false
mailSmtpConnectionTimeout=1000
mailErrorMsg=developers@openclinica.com

Gmail reference material

SMTP TLSSTARTTLS – GMAIL

mailHost=smtp.gmail.com
mailPort=587
mailProtocol=smtp
mailUsername=USERNAME@gmail.com
mailPassword=PASSWORD
mailSmtpAuth=true
mailSmtpStarttls.enable=true
mailSmtpsAuth=false
mailSmtpsStarttls.enable=false
mailSmtpConnectionTimeout=1000
mailErrorMsg=enterprise-support@akazaresearch.com

Gmail reference material

Troubleshooting Tips

While the above configurations have been tested and work, some people may nonetheless find issues sending email. If you are still having trouble sending email with your OpenClinica instance, the information below may assist you.

Make sure the mail server is accessible from your OpenClinica server:

Servers typically have firewalls in place that filter network traffic. You can use the following “telnet” command to ensure that your server can communicate on its port designated for email. For instance if you are using SMTP, most likely your mail server port is 25.

telnet $IP 25

Simply replace $IP with the IP address or hostname of your email server. If you see “Connected to $IP” the mail server is accessible from your server.

If you see “telnet: Unable to connect to remote host: Connection refused” the problem lies with your network access and you will not be able to send email until your server can communicate with the mail server through the specified port. Please consult your IT department to enable the network access you need.

Test email delivery:

You may use the following to test email delivery via telnet. This will allow you to rule out the OpenClinica application as the cause of the issue preventing email from working. This test is usually the most helpful in determining your issue with email delivery. (Note: this will not work for SMTPS or STARTTLS mail servers.)

Testing for SMTP no user authentication – http://www.yuki-onna.co.uk/email/smtp.html

Testing for SMTP with user authentication – http://www.webpan.com/Customers/Email/SMTP_Authentication_Telnet_Test.htm

If you are able to receive the test email sent via telnet on the OpenClinica server, then OpenClinica should have no issues with email delivery.

If you get an error message or issue with the telnet test on the OpenClinica server please contact your IT department or mail provider for help in resolving.

Other ideas or suggestions:

If you would like to submit any new configuration examples or troubleshooting tips based on your own experiece, we would be more then happy to post them on this page. To submit new configurations or tips please post to the users email list with a Subject of “E-mail Additions” and we will add them to this page. Thanks!