View Issue Details

IDProjectCategoryView StatusLast Update
0004107mantisbtemailpublic2004-08-29 01:49
Reporterjonas Assigned Tothraxisp  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version0.18.3 
Fixed in Version0.19.0rc1 
Summary0004107: email w/o recipient sent
Description

Mantis sometimes seems to send an email with no recipient. I have set the $g_to_email = '', and the system wont notify users about their own actions. Thus mantis will send an email to no recipients in some cases...

TagsNo tags attached.

Relationships

child of 0003987 closedvboctor Mantis 0.19.0 Release 

Activities

vboctor

vboctor

2004-07-15 16:21

manager   ~0006071

I assume this generates an error, right?

jonas

jonas

2004-07-16 02:13

reporter   ~0006075

Yes, the mailserver doesn't like the mail and sends a note to the sender (in my case the owner of the process, user www-data).

jlatour

jlatour

2004-08-06 11:35

reporter   ~0006717

You haven't configured Mantis to put the users in Bcc, I take it?

It sounds as if this is only a problem when no one is getting a mail (i.e. no recipients)? Is that correct?

jonas

jonas

2004-08-06 15:04

reporter   ~0006731

yes, that seems to be correct. I haven't checked the other options, but the email seems to have no recipients at all..

jlatour

jlatour

2004-08-06 18:10

reporter   ~0006736

And is that what is supposed to happen, or is it supposed to be sent to some recipients?

jonas

jonas

2004-08-09 05:46

reporter   ~0006856

Mantis beaves correctly, no one should receive an email... but mantis shouldn't send an email if there are no recipients...

jlatour

jlatour

2004-08-09 05:56

reporter   ~0006857

Quite.

jlatour

jlatour

2004-08-09 08:08

reporter   ~0006867

As far as I can tell from the code, it shouldn't send any mail:

(from email_send:)

short-circuit if no recipient is defined

if ( is_blank( $p_recipient ) && ( OFF == config_get('use_bcc') ) ) {
return;
}

is_blank even returns true if there is only whitespace in $p_recipient. Can you confirm that $g_use_bcc is set to OFF? And if so, can you see what the value of $p_recipient is when the problem occurs?

vboctor

vboctor

2004-08-09 08:41

manager   ~0006872

Following are my comments:

  • The use_bcc is an absolete configuration now, since we are sending an email per user. This should be removed from config_defaults_inc.php and added to core/obsolete.php.
  • The use_bcc is defaulted to ON, hence, this may cause the check for empty receipients to fail, and hence still attempt to send the email.

As per the current code, the line Jeroen highlighted is the only place where this config is used in core/email_api.php.

thraxisp

thraxisp

2004-08-15 18:10

reporter   ~0006996

fixed in CVS. removed to_mail and use_bcc config options.