View Issue Details

IDProjectCategoryView StatusLast Update
0016629mantisbtemailpublic2016-08-15 09:02
ReporterHorinius Assigned Todregad  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.15 
Target Version1.2.20Fixed in Version1.2.20 
Summary0016629: Behaviour change for SMTP server without authentication. Bug?
Description

This issue concerns the situation where SMTP is used for email.

In 1.1.6:
If the SMTP server does not require authentication, it didn't matter whether $g_smtp_username and $g_smtp_password are empty or not.

But in 1.2.15:
If the SMTP server does not require authentication, $g_smtp_username and $g_smtp_password MUST be empty strings, otherwise we will have "SMTP Error: Could not authenticate" which is very misleading.

Is this a bug or intentional? If it's intentional, I would like to request a documentation change for $g_smtp_username which is currently written like this:

$g_smtp_username

This option allows the use of SMTP Authentication when using a remote SMTP
host with PHPMailer. If smtp_username is not '' then the username and
password will be used when logging in to the SMTP server. Default is ''.

My suggestion is:

$g_smtp_username

This option allows the use of SMTP Authentication when using a remote SMTP
host with PHPMailer. If smtp_username is not '' then the username and
password will be used when logging in to the SMTP server. Default is ''.

WARNING: From version 1.x.y, if SMTP host does not require authentication,
$g_smtp_username and $g_smtp_password MUST contain empty strings.

TagsNo tags attached.

Relationships

related to 0017795 closeddregad Bug in the processing code for email settings 

Activities

dregad

dregad

2013-11-19 13:30

developer   ~0038595

In my opinion, the warning is not necessary, and in fact redundant since what Mantis does is quite obvious from the statement "If smtp_username is not '' then the username and password will be used when logging in to the SMTP server."

Horinius

Horinius

2014-10-09 13:12

reporter   ~0041490

Last edited: 2014-10-09 13:12

I'm sorry that I have to disagree.

The fact is that if username is defined, Mantis seems to change to ESMTP (for authentication). Even though the correct password is defined, if the SMTP does not require authentication, ie no ESMTP, email part would still fail and THIS is very misleading.

You see what I mean? Let's say in real life, there's a place you can get inside without authentication (ie without showing your identity). Does it matter if someone shows his ID card? Does it matter if someone speaks his name? No, it does not matter and should not matter. However, in our current situation, the fact that username is defined matters a lot and this behaviour is not intuitive.

Horinius

Horinius

2014-10-24 15:31

reporter   ~0041643

I'm sorry but I have to say that I'm happy another user has also fallen into this pitfall. It's a sign that the sentence
"If smtp_username is not '' then the username and password will be used when logging in to the SMTP server."
is very misleading and in some degree does not make sense.

I have some co-workers and friends also made this same mistake as well!

And in a pragmatic viewpoint, does it really hurt to add the suggested sentence in the documentation? If the presence of a sentence can make things clear, why would you still want to keep the ambiguity??

dregad

dregad

2015-02-03 16:22

developer   ~0048780

I updated the comment in config_defaults_inc.php as well as in the admin guide.

Related Changesets

MantisBT: master 10a049f7

2015-02-02 02:28

dregad


Details Diff
Improve SMTP options documentation

Amongst other changes, clarifies the fact that $g_smtp_username must be
set to '' when SMTP host does not need authentication.

Fixes 0016629, 0017795
Affected Issues
0016629, 0017795
mod - config_defaults_inc.php Diff File
mod - docbook/Admin_Guide/en-US/config/email.xml Diff File

MantisBT: master-1.2.x a4b8e39a

2015-02-02 02:28

dregad


Details Diff
Improve SMTP options documentation

Amongst other changes, clarifies the fact that $g_smtp_username must be
set to '' when SMTP host does not need authentication.

Fixes 0016629, 0017795
Affected Issues
0016629, 0017795
mod - config_defaults_inc.php Diff File
mod - docbook/administration_guide/en/configuration.sgml Diff File