Using FogBugz On Demand? We've recently rolled out a new sidebar as part of taking FogBugz forward. Please see this article for details on what's new, what's changed, and where you can find all your favorite things.

First, if you’re not sure that SSL is to blame, here are thorough, general debugging steps for outgoing mail problems If your mail server’s certificate is self-signed, check out these instructions.

How SSL over SMTP works

There are two ways to do SMTP over SSL: Explicit and Implicit. Explicit means you connect to a normal SMTP port (usually 25 or 587) in plaintext, then issue the “starttls” command to switch to SSL-mode. Implicit means you connect to a port that expects everything to be SSL (usually 465). In FogBugz, we support Explicit SSL automatically if you check the “Use SSL” box in Site Settings. This means that connecting to servers like Gmail is much easier: just put in the server, port, and check the box. If the server doesn’t support Explicit SSL, then you still have to use Stunnel which is a bit more complicated. For more info, see this MSDN article.

Setting it up in FogBugz

I. Determine if the server supports Explicit SSL

  1. Telnet to the server at port 25 (or whatever the normal SMTP port is): (e.g. from command line, “telnet testmail.hq.fogcreek.com 25”). If you are on Windows and get a message saying that the command is not found, you’re probably on Windows 7. Search Google for “enable telnet windows 7” to get several options to re-enable
  2. Type “starttls” and hit enter. If Explicit SSL is supported, you should see “220 2.0.0 Ready to start TLS”

II. If the server supports Explicit SSL

  1. In FogBugz, go to Admin > Site
  2. Set the SMTP server and port (using the normal, non-SSL port, probably either 25 or 587)
  3. Check the “Use SSL” box

II. If the server only supports Implicit SSL

  1. Set up Stunnel. Follow the instructions here, but use these lines in your config:
    [SMTP FogBugz]
    accept  = 1099
    connect = [smtp server]:[smtp port - usually 465]
  2. Verify that Stunnel is working using telnet: 1. From a command line, run “telnet localhost 1099”. You should see something like “220 [smtp-server]”. 2. In telnet, type “starttls”. You should see something like “554 5.5.1 Error: TLS already active”
  3. In FogBugz, go to Admin > Site
  4. Set the SMTP server to “localhost” and the port to 1099
  5. Uncheck the “Use SSL” box

Certificate Problems

If FogBugz gives you an error about your certificate when setting up SMTP, or in site diagnostics on the mail sending step, see this guide.