After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 554414 - Space in front or at end of email addresses prevents mails from being sent
Space in front or at end of email addresses prevents mails from being sent
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Contacts
2.22.x (obsolete)
Other All
: Normal minor
: ---
Assigned To: evolution-addressbook-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2008-09-30 12:07 UTC by Massimiliano Zattera
Modified: 2010-03-11 14:10 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Evolution Addressbook Patch (554 bytes, patch)
2010-03-10 09:54 UTC, Punit Jain
reviewed Details | Review

Description Massimiliano Zattera 2008-09-30 12:07:10 UTC
Please describe the problem:
If you create a contact with leading or trailing spaces in the email address, this will prevent mails to be sent to that contact.

Steps to reproduce:
1. Start Evolution

2. Click File > New > Contact to create a new contact

3. Enter contact full name and email address. WHEN TYPING THE EMAIL ADDRESS PUT A SPACE IN FRONT AND AFTER THE EMAIL.

4. Click OK to close contact dialog and create the contact

5. Click File > New > "Mail message" to create a new mail

6. In To: field type the name of the newly created contact.

Actual results:
Evolution will auto-complete the field with the email address you entered at point 3.

Note that THE LEADING AND TRAILING SPACES WILL BE INCLUDED IN THE EMAIL ADDRESS BETWEEN ANGLE BRACKETS. This will cause SMTP servers to reject the address (it happens with gmail servers for sure).

Expected results:
When user enters leading and trailing spaces in contacts email addresses, these should be stripped away by the program.

It's good programming practice to always strip leading and trailing spaces in any input field anyway.

Does this happen every time?
Yes

Other information:
Comment 1 Punit Jain 2010-03-10 09:54:08 UTC
Created attachment 155714 [details] [review]
Evolution Addressbook Patch

It removes leading and trailing spaces from email while storing them.
Comment 2 Matthew Barnes 2010-03-10 14:41:02 UTC
Patch is fine for new contacts created in Evolution, but we should also guard against this for existing contacts or new contacts created from other clients.  Probably want to patch EDestination to strip spaces wherever "priv->email" gets set.
Comment 3 Matthew Barnes 2010-03-10 20:24:04 UTC
Fixed the contact editor and also made e_contact_get() strip whitespace off any returned strings.

http://git.gnome.org/browse/evolution/commit/?id=7ff2c1327e2bba4b88e8d37107a06cc5da7fd78b

http://git.gnome.org/browse/evolution-data-server/commit/?id=baa347bda65b0cf11b6d94e607ac0a864bbc78b4