Bugzilla mail_delivery_method using TLS for Gmail

For anyone trying to set up Bugzilla's email feature to use Gmail on a windows machine, I just spent two and a half days at work with dawood's solution http://www.dawood.in/bugzilla_alerts_using_gmail.html, to no avail. My machine is running 64 bit Windows 7, And I eventually did find a solution, skip to the third paragraph for that. Here's why Dawood's solution won't work for most windows users:

Chances are, if you installed Bugzilla the by following the (awesome) tutorials, you installed ActivePerl. The Email::Send::SMTP::TLS perl package that Dawood's solution revolves around depends upon an Email::SMTP::TLS::ButMaintained package, which, in turn, depends upon a Net::SSLeay package. (This is why, even after following Dawood's instructions and modifying Mailer.pm, no "SMTP::TLS" option appears in the drop down list. The dependencies aren't resolved.) The trouble is, Net::SSLeay will only install if it is compiled with THE SAME compiler you used to compile Perl. In addition, The documentation says: "Please do not even dream of copying a perl binary or installing perl binary from a package." Oh... whoops... ActivePerl is binary installed from a package. Since that won't work, here's what will.

To configure Bugzilla to send mail through Gmail's smtp server:

  1. Download Glob's sendmail wrapper for windows at http://glob.com.au/sendmail/, and unzip
  2. copy sendmail.exe and sendmail.ini to \usr\lib on the drive where the unix application is installed. So if Bugzilla is installed at C:\Bugzilla, create a 'usr' folder at the root level of the C: drive, with a 'lib' folder within that.
  3. open up sendmail.ini.
  4. within sendmail.ini copy and paste these values on the appropriate lines:
    • smtp_server=smtp.gmail.com:587
    • smtp_ssl=tls
    • auth_username=<INSERT YOUR USERNAME HERE>
    • auth_password=<INSERT YOUR PASSWORD HERE>
    • if your gmail server runs on a specific domain, make sure to uncomment and fill in the default_domain parameter.
  5. now go to the Administration tab in Bugzilla, and select Parameters
  6. Choose Email from the sidebar on the left.
  7. In the pulldown menu under mail_delivery_method, select Sendmail.
  8. You're done! Bugzilla will send email through gmail's smtp server.

Actually I was able to use dawood's method to send email from Windows.

http://www.dawood.in/bugzilla_alerts_using_gmail.html

I installed ActivePerl 5.16.1 32bit on Windows 7 64bit and used CPAN to install the Email::Send::SMTP::TLS module. From command line open cpan:

C:\>cpan

Then from within cpan, install the module:

cpan> install Email::Send::SMTP::TLS

Which should automatically install the dependency Net::SMTP::TLS::ButMaintained. Although Net::SSLeay was not installed, email still worked fine so I assume it's not a dependency anymore.

I then followed dawood's instructions to modify the Mailer.pm file. It has worked fine.