Commit 48abace8 authored by Adam Krupicka's avatar Adam Krupicka

Improve canonicalize-address to better handle possible whitespace

parent 54b994b7
......@@ -163,11 +163,12 @@
(defun canonicalize-address (address)
"If address is in the form 'Name <address>', return only address.\
Otherwise, return the original address."
(let ((pos (search "<" address)))
(if pos
(let ((pos< (search "<" address))
(pos> (search ">" address)))
(if (and pos< pos>)
(subseq address
(1+ pos)
(- (length address) 1))
(1+ pos<)
pos>)
address)))
(define-condition smtp-error (error)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment