Closed Bug 280911 Opened 21 years ago Closed 20 years ago

Global symbol "$person" requires explicit package name at Bugzilla/BugMail.pm line 879 (Fix Win32 SMTP)

Categories

(Bugzilla :: Email Notifications, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: mexicomouse, Assigned: Wurblzap)

References

Details

(Keywords: regression, Whiteboard: [does not affect trunk])

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322) Build Identifier: "Bugzilla Version 2.18" in the document file of "The Bugzilla Guide - 2.17.4 Development Release" at http://www.bugzilla.org/docs/html/os-specific.html, Chapter 4.3. OS Specific Installation Notes, 4.3.1.3.2. Changes to BugMail.pm, The document said that the open(SENDMAIL... maybe replaced by the followng: use Net::SMTP; $smtp_server = 'smtp.mycompany.com'; # change this # Use die on error, so that the mail will be in the 'unsent mails' and ... ... === So I followed those instructions and after this I couldn`t open bugzilla anymore Reproducible: Always Steps to Reproduce: 1. follow the steps in bugzilla-2.17.4 document 4.3.1.3.2 9 2. and try to enter at bugzilla main page 3. Actual Results: Actual Results: The application don't start. And I receive this error, at my error.log of the server: Error Msg: Global symbol "$person" requires explicit package name at Bugzilla/BugMail.pm line 879 Nothing is registred at the error.log and debug.log from the sendmail directory.
Confirming. This is a regression of bug 59351. It affects documentation as well as code. mexicomouse, you can make this work by a few more changes. Find MessageToMTA($msg), and replace this by MessageToMTA($msg, $person). Do a similar change to all other files where there is a call to MessageToMTA. Then, find sub MessageToMTA ($) and add another $ inside the brackets. The next line, saying my ($msg) = (@_); should be replaced by my ($msg, $mail_to) = (@_); In your added line $smtp->to($person), replace $person by $mail_to.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Hi Marc, tks for the help, I´ve changed following your instructions and find this new error: Software error: Malformed prototype for Bugzilla::BugMail::MessageToMTA: $,$ at CGI.pl line 229. For help, please send mail to the webmaster (mexicomouse@hotmail.com), giving this error message and the time and date of the error. Software error: [Thu Feb 3 15:22:06 2005] editparams.cgi: Malformed prototype for Bugzilla::BugMail::MessageToMTA: $,$ at CGI.pl line 229. Compilation failed in require at C:/Arquivos de programas/Apache Group/Apache2/htdocs/bugzilla/editparams.cgi line 31. For help, please send mail to the webmaster (mexicomouse@hotmail.com), giving this error message and the time and date of the error. == My line 229 at CGI.pl is: sub MessageToMTA ($,$) { Waiting for your answer. greetings, jc
Drop the comma.
without the coma, I got the same error as before: Software error: Global symbol "$person" requires explicit package name at CGI.pl line 229. BEGIN not safe after errors--compilation aborted at CGI.pl line 417. For help, please send mail to the webmaster (mexicomouse@hotmail.com), giving this error message and the time and date of the error. Software error: [Thu Feb 3 15:37:13 2005] enter_bug.cgi: Global symbol "$person" requires explicit package name at CGI.pl line 229. [Thu Feb 3 15:37:13 2005] enter_bug.cgi: BEGIN not safe after errors-- compilation aborted at CGI.pl line 417. Compilation failed in require at C:/Arquivos de programas/Apache Group/Apache2/htdocs/bugzilla/enter_bug.cgi line 41. == My line 229 at CGI.pl, don´t have any link with the error. It´s a blank line.
Did you do this, from comment 1? > In your added line $smtp->to($person), replace $person by $mail_to. I suggested a solution from the top of my head, assuming that there'd be some work left to be done... Please try figuring this out by yourself, it shouldn't be too hard. If you can't get it to work, please ask at the newsgroup or mailing list, leaving this bug's discussion to the fix. Otherwise, please wait for the patch :) Or even better, attach a patch if you do figure it out :)
Attached patch Patch, including doc change (obsolete) — Splinter Review
This adds optional rcpt_to and mail_from parameters to MessageToMTA, making the Win32 specific Net::SMTP hack possible again. Docs changed as well.
Assignee: email-notifications → wurblzap
Status: NEW → ASSIGNED
Attachment #173347 - Flags: review?
*** This bug has been marked as a duplicate of 277106 ***
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
While this may technically be a dupe of bug 277106, it is duped to bug 49893 because it may be fixed there at some time. We're dealing with a regression here, and since bug 277437 took care of it for HEAD, we still need a regression fix for 2.18.
Status: RESOLVED → REOPENED
Flags: blocking2.18.1?
Keywords: regression
Resolution: DUPLICATE → ---
Target Milestone: --- → Bugzilla 2.18
Attachment #173347 - Flags: review?
Attached patch Branch patchSplinter Review
Attachment #173347 - Attachment is obsolete: true
Attachment #173614 - Flags: review?
Status: REOPENED → ASSIGNED
*** Bug 286206 has been marked as a duplicate of this bug. ***
in BugMail.pm, add 2 lines maybe help. 861 sub MessageToMTA ($) { 862 863 my ($msg) = (@_); 864 $msg =~m/To: (.*)/; #<-- find rcpt 865 my ($person) = $1; #<-- rcpt to $person
Flags: blocking2.18.1? → blocking2.18.1+
Whiteboard: [does not affect trunk]
Comment on attachment 173614 [details] [diff] [review] Branch patch You added a $mail_from parameter to MessageToMTA but it's totally not used by the callers. :-) So you'll want to remove the parameter and change the line in the docs. You'll want to add a comment that the $rcpt_to parameter exists entirely for customizers. Also, why will flag mail not work? Other than that, this looks like a decent solution for a frozen branch.
Attachment #173614 - Flags: review? → review-
Comment on attachment 173614 [details] [diff] [review] Branch patch Requesting review on the same patch again. (In reply to comment #12) > You added a $mail_from parameter to MessageToMTA but it's totally not used by > the callers. :-) So you'll want to remove the parameter and change the line in > the docs. What I'm doing here is addressing *your* comment in the original code that these parameters should be added :) (The idea behind this is or was probably separation of SMTP envelope and content.) > Also, why will flag mail not work? Because flag mail has multiple recipients at once. One might argue that $rcpt_to should perhaps be a list, but I think that's out of scope of this bug.
Attachment #173614 - Flags: review?(mkanat)
*** Bug 286567 has been marked as a duplicate of this bug. ***
Comment on attachment 173614 [details] [diff] [review] Branch patch (In reply to comment #13) > What I'm doing here is addressing *your* comment in the original code that > these parameters should be added :) Ahh, yes, my comment was wrong. :-) But I can fix that on checkin, I suppose.
Attachment #173614 - Flags: review?(mkanat)
Attachment #173614 - Flags: review-
Attachment #173614 - Flags: review+
Flags: approval2.18?
Flags: approval2.18? → approval2.18+
OS: Windows XP → All
Hardware: PC → All
Whiteboard: [does not affect trunk] → [patch awaiting checkin] [does not affect trunk]
OK, I removed the $mail_from bits from installation.xml and BugMail.pm upon checkin. Checking in CGI.pl; /cvsroot/mozilla/webtools/bugzilla/CGI.pl,v <-- CGI.pl new revision: 1.211.2.9; previous revision: 1.211.2.8 done Checking in globals.pl; /cvsroot/mozilla/webtools/bugzilla/globals.pl,v <-- globals.pl new revision: 1.270.2.8; previous revision: 1.270.2.7 done Checking in importxml.pl; /cvsroot/mozilla/webtools/bugzilla/importxml.pl,v <-- importxml.pl new revision: 1.36.2.3; previous revision: 1.36.2.2 done Checking in move.pl; /cvsroot/mozilla/webtools/bugzilla/move.pl,v <-- move.pl new revision: 1.26.2.3; previous revision: 1.26.2.2 done Checking in whineatnews.pl; /cvsroot/mozilla/webtools/bugzilla/whineatnews.pl,v <-- whineatnews.pl new revision: 1.14.2.2; previous revision: 1.14.2.1 done Checking in Bugzilla/BugMail.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm,v <-- BugMail.pm new revision: 1.13.2.4; previous revision: 1.13.2.3 done Checking in Bugzilla/Token.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Token.pm,v <-- Token.pm new revision: 1.22.2.3; previous revision: 1.22.2.2 done Checking in docs/xml/installation.xml; /cvsroot/mozilla/webtools/bugzilla/docs/xml/installation.xml,v <-- installation.xml new revision: 1.72.2.21; previous revision: 1.72.2.20 done
Status: ASSIGNED → RESOLVED
Closed: 21 years ago20 years ago
Keywords: relnote
Resolution: --- → FIXED
Summary: Global symbol "$person" requires explicit package name at Bugzilla/BugMail.pm line 879 → Global symbol "$person" requires explicit package name at Bugzilla/BugMail.pm line 879 (Fix Win32 SMTP)
Whiteboard: [patch awaiting checkin] [does not affect trunk] → [does not affect trunk]
Keywords: relnote
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: