Closed Bug 96309 Opened 24 years ago Closed 23 years ago

Adding a new mail account doesn't work when smtp is host:port

Categories

(SeaMonkey :: MailNews: Account Configuration, defect)

defect
Not set
major

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 106631
mozilla0.9.9

People

(Reporter: inactive-mailbox, Assigned: racham)

References

Details

Attachments

(2 files)

To reproduce, go to mail news preferences, select outgoing server (smtp), and append the string :25 to your current host. This is a valid configuration. It is actually necessary to use that configuration if your smtp server is running on a non-standard port. (If you want, test that you still can send mail - this should be possible) Now, in account manager, press "new account" button. Select ISP, next, enter a name and e-mail address, next, enter a server name, click next. You now see an error message "Please enter a valid hostname". The reason is: JavaScript function "hostnameIsIllegal" is called. The check doesn't allow a colon. I even don't understand why this function checks the smtp host at all. If the smtp server is not entered by the user during this wizard procedure, it shouldn't be checked at all. Maybe there is a better location where this check should be made. I'm attaching a fix, allowing colon and removing check for smtp host.
Depends on: 52330
*** Bug 97436 has been marked as a duplicate of this bug. ***
Keywords: patch, review
*** Bug 85834 has been marked as a duplicate of this bug. ***
could we get some reviews here? nominating
Keywords: mozilla0.9.6
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.7
I don't think this is bad place to check smtpserver for correctness (more or less). If you don't want fail on empty server string, just replace (smtpserver && hostnameIsIllegal(smtpserver.value)) with (smtpserver && smtpserver.value != "" && hostnameIsIllegal(smtpserver.value)) in function validate(). Also, adding ':' to valid char set will permit such hostnames as "q:w.w:q.com:123" etc. I suggest another fix, see attachment 55730 [details] [diff] [review]. OTOH, bug 52330 covers this one. I mean, if support for multiple (non-default) port will be added to UI, then there is no need to fix this bug...
It sounds like this is related to 106631
Target Milestone: mozilla0.9.7 → mozilla0.9.9
*** This bug has been marked as a duplicate of 106631 ***
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Verified duplicate.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: