Bugzilla suffers internal error when sending email through gmail

RESOLVED DUPLICATE of bug 466419

Status

()

Bugzilla
Email Notifications
RESOLVED DUPLICATE of bug 466419
9 years ago
9 years ago

People

(Reporter: Sergey Kochkarev, Unassigned)

Tracking

x86
Windows XP

Details

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322)
Build Identifier: Bugzilla 3.4

[Wed Jul 29 13:37:33 2009] [error] [client 82.179.65.88] [Wed Jul 29 13:37:33 2009] process_bug.cgi: Use of uninitialized value $username in length at C:/usr/site/lib/Net/SMTP.pm line 130., referer: http://82.179.65.88/bugzilla-3.4/process_bug.cgi

sub auth {
  my ($self, $username, $password) = @_;

  eval {
    require MIME::Base64;
    require Authen::SASL;
  } or $self->set_status(500, ["Need MIME::Base64 and Authen::SASL todo auth"]), return 0;

  my $mechanisms = $self->supports('AUTH', 500, ["Command unknown: 'AUTH'"]);
  return unless defined $mechanisms;

  my $sasl;

  if (ref($username) and UNIVERSAL::isa($username, 'Authen::SASL')) {
    $sasl = $username;
    $sasl->mechanism($mechanisms);
  }
  else {
>>>>> [130]    die "auth(username, password)" if not length $username;
    $sasl = Authen::SASL->new(
      mechanism => $mechanisms,
      callback  => {
        user     => $username,
        pass     => $password,
        authname => $username,
      }
    );
  }


Reproducible: Always

Steps to Reproduce:
1. Create a bug
2. Choose Submit
3. Voila
Actual Results:  
An error message: undef auth(username, password)

Expected Results:  
Sending mail to the person responsible for bugs

I managed to fix it by changing line 169 of bugzilla/mailer.pm:

    if ($method eq "SMTP") {
to
    if ($method eq "SMTP" || $method eq "Gmail") {
(Reporter)

Updated

9 years ago
Version: unspecified → 3.4

Comment 1

9 years ago
The reason it fails is that Gmail requires SSL, and we don't support that yet.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 466419
(Reporter)

Comment 2

9 years ago
Thanks.

As I wrote earlier, my bugzilla works with gmail. It is apache 2.2, WinXP.

I also managed to make it work on Linux.

Should I post my diffs?

Comment 3

9 years ago
(In reply to comment #2)
> Should I post my diffs?

If they are not hacks, yes, attach your patch. But do this in bug 466419, please.
You need to log in before you can comment on or make changes to this bug.