Author Archives: dawood

If Google Was a Guy (Part 2)

If Google was a Guy


Bugzilla alerts using GMail

This article explains how to use GMAIL SMTP(TLS AUTH) to send bugzilla alerts.

Bugzilla supports following methods to send mail alerts :

  • sendmail
  • SMTP

For SMTP method BugZilla uses Email::Send::SMTP Perl module. GMAIL SMTP uses TLS ( Transport Layer Security ) as authentication method, so Email::Send::SMTP can not be used for the same.

We need to use another perl module Email::Send::SMTP::TLS.
First step would be to install Email::Send::SMTP::TLS from CPAN. use following steps to do so :

using CPAN shell

Lanch CPAN shell as follows

and then on CPAN Shell execute following command

cpan shell might ask you to install additional modules, install them.

compiling from source
Download source from HERE and execute following commands


NOTE: If you are facing issues in installing Email::Send::SMTP::TLS module on Microsoft Windows, please follow this thread


Once Email:Send::SMTP::TLS is installed, BugZilla should have SMTP::TLS method to send alerts. This can be verified by logging in as admin to BugZilla and going to Administration -> Parameters -> Email


Now we need tweak BugZilla code. carefully execute following instructions and don’t forget to backup files before you modify.
Go to your BugZilla installation directory and execute following command

Open file.

Add following line after last ‘use’ statment

Search for following code

add following line after it

search for following if block

and change it to

Now we need to do settings in bugzilla parameters.
Login as administrator to Bugzilla and go to Administration -> Parameters -> Email and do following settings

  1. Select SMTP::TLS as mail_delivery_methodbugzilla_tls_method-300x162
  2. Enter your gmail address in mailfrom


  3.  Enter in smtpserverbugzilla_tls_smtpserver
  4.  Enter in smtp_usernamebugzilla_tls_smtpuser
  5. Enter gmail password in smtp_passwordbugzilla_tls_smtppass
  6. Click on save changes