Bug 175892 - sending mail fails due to spurious newline in server name configuration
Summary: sending mail fails due to spurious newline in server name configuration
Status: RESOLVED FIXED
Alias: None
Product: kdepimlibs
Classification: Applications
Component: mailtransport (show other bugs)
Version: 4.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Tom Albers
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2008-11-23 15:49 UTC by Peter Sabaini
Modified: 2008-11-25 19:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Sabaini 2008-11-23 15:49:49 UTC
Version:            (using KDE 4.1.2)
OS:                Linux
Installed from:    Ubuntu Packages

Probably because I copy-pasted the Servername into the dialog, the config file ended up with a literal '\n' at the end of the servername:

% grep host .kde/share/config/mailtransports
host=smtp.tele2.at\n

KMail is unable to send any mail with this config; after opening mailtransports in an editor and removing the literal \n it works. 

Whitespace chars should probably be filtered out before writing the configuration.
Comment 1 Peter Sabaini 2008-11-23 15:55:12 UTC
Also, the error message is a bit unhelpful -- I just get:

Sending failed:
smtp://user:pass@smtp.tele2.at
:587/send?headers=0&from=peter%40sabaini.at&to=peter%40sabaini.at&size=375

Comment 2 Jaime Torres 2008-11-25 11:41:38 UTC
Confirmed in kmail 1.10.90 svn trunk r888112 in the outgoing accounts.
Comment 3 Tom Albers 2008-11-25 19:21:08 UTC
SVN commit 888995 by toma:

Make sure the hostname does not end with a \n. Strip it on input and strip it on retrieval.
Thanks for your bug report.
BUG: 175892


 M  +1 -1      smtpjob.cpp  
 M  +3 -0      transport.cpp  
 M  +12 -1     transportconfigdialog.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=888995