Email sending problem

Hello, and thank you for this wonderful piece of software!

I just finished installing Web-CAT on Ubuntu, and I plan on testing it out during this Summer semester so we can have a full deployment during the upcoming Fall semester.

However, I am having trouble getting Web-CAT to send emails. I installed it on Ubuntu Server with Tomcat 7 and MySQL, and I configured SSMTP to relay the emails through Google SMTP (and verified that it works). But when I try to send the "forgot password" email, nothing arrives at my inbox, so I guess this means the email sending is broken. In the Web-CAT configuration properties, the key is set to localhost.

Do I need a different value for the configuration key? Or is SSMTP not the right way to do it? I need it to send through the Google SMTP servers, since this is what our mail system uses. If this configuration should work, then what log files can I check to figure out what is keeping it from working?

Thank you.



Stephen Edwards

David's comments are helpful here

Web-CAT is set up to use any relaying smtp server for outgoing mail.  In particular, Web-CAT does not use sendmail directly on the localhost to generate outgoing messages. It uses Java's mail API to directly send mail via the configured smtp server.

The reason for this is that people set up servers in a variety of different ways, and Web-CAT is running on lots of OSes--many Web-CAT servers aren't unix-style servers and don't have local sendmail abilities. As a result, Web-CAT's e-mail features assume that there is an accessible smtp server through which mail can be routed. You configure the DNS name (or IP) for this server during the self-installation wizard. Later, you can change it through the admin pages (choose the "admin" role in the top center of the page, then click on the "Subsystems" menu; look for the Core subsystem and click the edit icon on the righthand side of its row in the table; edit the "SMTP Host Name" setting; you'll have to restart the server after saving to see the effect.).

So the key is making sure you have an available SMTP server you can route through--which can be localhost, but need not be. It just depends on your local environment. In David's e-mail, he suggested doing exactly that: setting up the machine so it can serve as an outgoing SMTP server, and then resetting Web-CAT's "SMTP Host Name" to "localhost". That will work fine. You do need to make sure that your firewall will permit incoming connections (from localhost, at least), which it probably won't by default for many unix installs. You'll also need to make sure that your sendmail configuration doesn't prevent relaying (from localhost, at least). The config is usually in /etc/mail directory).

Since you say you've set up sendmail on localhost and can send outgoing mail via the command line, I'd suggest that you first double-check your firewall config, and then (using the admin Subsystems menu) double-check that the Web-CAT server is using the correct SMTP host name. If that all checks out, the next step is to examine the tomcat log file to see whether there are any Java exceptions from sending mail. If Web-CAT can't send e-mail due to an exception, in addition to the exception itself, it will also dump the text of the failed e-mail message to its log. Confirm that the message you want to send is there, and take a look at the exception to see what it indicates. This may help track down the problem.

It sounds like you're most of the way there, but missing one piece of the puzzle. Hopefully the log info will help. If you can't make any sense of the log, you can e-mail it to me and I'll try to help.


Email sending problem

Hello randomizer, as you stated WebCat is great, but I had the same kind of problems to send email.

My server configuration is a bit different, but not so different; CentOS 6.4 64 bits, Tomcat 7.0.42 and MySQL; first thing I've tried was to rely on, but nothing happened, in addition I was getting Java Mail errors on Tomcat logs, finally the following solution came to me.

  1. Setup sendmail service on my server and of course to start automatically
  2. Open port 25 on firewall
  3. Change the value of variable from to localhost, I did it directly on the properties file located at ./WEB-INF/Web-CAT.woa/ under your Web-CAT own deployed webapp in despite of the WARNING: do not edit this file.  It is automatically generated.
  4. Reboot of the server

And afterwards I was able to send e-mail appropriately, donĀ“t forget to setup your /etc/hosts file too.


I hope this info is still useful.



ed pack

Email sending problem

I still have problem with WebCAT to send email even after I got sendmail to send myself an email.  What do I do with the /etc/hosts?