My SMTP server does not require a username and password. The module would not work because the SMTP Authentication Username and Password fields were auto-filled with my drupal username and password. The fields would not remain blank.

CommentFileSizeAuthor
#7 smtp.empty_auth.patch1.33 KBfranz
#4 smtp-emptyauth.patch1.28 KBfranz

Comments

franz’s picture

Priority: Major » Normal

What actually happens is that when you submit the password field empty, it doesn't change the password. This was because there was an issue about displaying the password in the field, so it is a one-way field, it has that behaviour.

For testing and workaround, could you comment line 241 and submit the values. If the connection work with both variables set to empty strings, we could have a checkbox for not using auth values.

alauddin’s picture

Same issue....I dont require smtp user/pass but the module keepa adding 'admin' & some password?

I tried your suggestion to uncomment line 241

unset($form_state['values']['smtp_password']);

but the admin/password stays.

I even tried removing the whole if statement line 240 - 242

if (empty($form_state['values']['smtp_password'])) {
unset($form_state['values']['smtp_password']);
}

franz’s picture

Status: Active » Needs work

I think we need the checkbox option, which is, I think, the most appropriate solution.

franz’s picture

Status: Needs work » Needs review
StatusFileSize
new1.28 KB

Before changing the interface, I changed the code so that if the username is empty, both fields should be set to empty. I haven't test it on my machine, could you please do it and report if successful?

cjback’s picture

I installed the patch. Tried saving with the username blank, both username/password blank and password blank but the fields would not clear.

franz’s picture

cjback, of course! The patch is dumb!

Now, this was a long time ago, I'll go check

franz’s picture

Version: 6.x-1.0-beta5 » 6.x-1.x-dev
StatusFileSize
new1.33 KB

Sorry, but I tested it and got it working, at least it sets both variables to empty string.

Re-rolled patch to latest dev

rainbowarray’s picture

This error appears in the 7.x version as well.

josesanmartin’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

Commited to 6.x. Moving ticket to 7.x so that it gets commited there as well.

josesanmartin’s picture

Status: Needs review » Reviewed & tested by the community
franz’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -password, -username, -blank

Committed to D7

Also removing "blog-like" tags... (http://drupal.org/node/1023102)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

zopa’s picture

Version: 7.x-1.x-dev » 7.x-1.0

i'm re-opening because i'm running SMTP Authentication Support 7.x-1.0 and this issue of SMTP authentication fields not staying blank seems to still be persisting -- did the fix in 7.x-1.0-beta2 (http://drupal.org/node/1791794) get ported over to this recent 2/17/2013 release?

zopa’s picture

Status: Closed (fixed) » Active
dwrooke’s picture

I've just installed the 7.x-1.0-dev module and am seeing that the username and password fields will not clear. Can you advise what I should do please?

Anjaro’s picture

Any word on this ?

pmoz’s picture

Looking for this answer as well.

rv0’s picture

Issue summary: View changes

Perhaps this is an OS related issue? I have the issue both in Safari & Chrome on OSX, but not in Firefox and Opera

wundo’s picture

Status: Active » Closed (works as designed)

Marking this as fixed, please open a new issue if you encounter any problem.

Talkless’s picture

I have same problem in drupal 7.27. I cannot clear SMTP username and password.