View Issue Details

IDProjectCategoryView StatusLast Update
0003028mantisbtbugtrackerpublic2004-02-06 16:15
ReporterBertHuijben Assigned Tojlatour  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
PlatformWindows 2000 ServerOSWindows 2000 ServerOS VersionW2KSP3, PHP4.3.0
Product Version0.18.0a3 
Summary0003028: Error while sending mails (e.g. after reporting bug)
Description

Since 0.18.0a3 my server doesn't send bug mails, and gives this nice error instead:

SYSTEM WARNING: mail() [<a href='http://www.php.net/function.mail'>function.mail</a>]: SMTP server response: 553 5.0.0 < >... User address required
(email_api.php: line 710)

Steps To Reproduce

Our system uses IIS with PHP 4.3.0

Additional Information

SYSTEM WARNING: mail() [<a href='http://www.php.net/function.mail'>function.mail</a>]: SMTP server response: 553 5.0.0 < >... User address required
(email_api.php: line 710)

PROBLEMS SENDING MAIL TO: <snip>

From: <snip>
X-Sender: <snip>
X-Mailer: PHP/4.3.0
X-Priority: 3
Return-Path: mantis-admin@aim-4.net
Content-Type: text/plain; charset=iso-8859-15
Bcc:

The following NEW bug has been ADDED.

(The <snip> addresses have been removed, because these are internal addresses within our company)

TagsNo tags attached.

Activities

BertHuijben

BertHuijben

2003-03-03 14:22

reporter   ~0003903

If I add
$g_use_bcc = OFF;

(Which wasn't needed before 0.18.0a3)
I do not get errors, bu I do not get any e-mails either ;-)

brody

brody

2003-03-04 09:25

reporter   ~0003912

Because we are using the BCC send mail feature of php mail - does that mean, that bcc:-sending doesn't work actually?
If so, please fix it til 0.18.0 release, please

BertHuijben

BertHuijben

2003-03-04 09:50

reporter   ~0003913

In 0.17.5, 0.18.0a1 and 0.18.0a2 I used the BCC feature on W2K and did not experience any problems (PHP 4.3.0), but with 0.18.0a3 I have not received a single mail yet.

(Before 0.18.0a3 I didn't use $g_use_bcc = OFF; and mailing just worked as it should.. But now it doesn't at all.)

(The Bcc field of the error message is empty, while I would assume it should contain the real receipents)

BertHuijben

BertHuijben

2003-03-08 00:32

reporter   ~0003937

I had to add:

$g_default_notify_flags['threshold_min'] = DEVELOPER;
$g_default_notify_flags['threshold_max'] = ADMINISTRATOR;
$g_email_receive_own = ON;

after upgrading to 0.18.0a3, to keep the same behevior as before for developer-admin.

The BCC error page is the real bug. There were no receipents for the bug report without these added settings, as was noted by the mail server.

jfitzell

jfitzell

2003-03-09 03:44

reporter   ~0003941

ok, someone should look at this then.

We intended to add a note to the release notes about that config change - sorry about that. But there shouldn't be an error with no recipients. I take it this only happens when use_bcc is off?

jfitzell

jfitzell

2003-03-09 03:46

reporter   ~0003942

As an aside, make sure you run the admin/check.php page after an upgrade. It will tell you any config options you may have overriden that are now obsolete. In this case it wouldn't help because we actually changed the default behaviour. Perhaps we should put the behaviour back so that developers get emails by defaults. The issue was that a lot of people didn't like admins getting emails by default - and I couldn't think of a default that would really make everybody happy.

jancm

jancm

2003-03-12 21:47

reporter   ~0003975

Last edited: 2003-03-12 21:49

A fix for the bcc error with no recipients:

In email_api.php
line 285

Currently:

win-bcc-bug

    if ( $t_use_bcc ) {
        $t_bcc .= "\n";
    }

Change this to:

win-bcc-bug

    if ( $t_use_bcc and strlen($t_bcc) > 5  )
       {
        $t_bcc .= "\n";
       }
    else
       {
        $t_bcc = "";
       }

The problem actually was created up in line 279, but it's probably easier to fix it here. The length of 5 is to account for "Bcc: " (as inserted in 279).

And I don't think you'll get a valid email address that's less than 5 characters anyway, so there shouldn't be a problem even if the "Bcc: " isn't inserted (see 279).

edited on: 03-12-03 21:49

jlatour

jlatour

2004-02-05 16:13

reporter   ~0004956

I used a different fix (which should work regardless of the size of the email adress), which has been committed to CVS and should be in the next release.

Related Changesets

MantisBT: master 9b483a29

2004-02-05 16:10

jlatour


Details Diff
Fix 0003028: Mailer produces errors if there are no recipients, and use_bcc is set to ON.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2302 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9
Affected Issues
0003028
mod - doc/ChangeLog Diff File
mod - core/email_api.php Diff File