projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f386e2d
)
[REVIEW] tools: moved email_split function in emails section, instead of 'somwhere...
author
Thibault Delavallée
<tde@openerp.com>
Tue, 28 Aug 2012 07:34:14 +0000
(09:34 +0200)
committer
Thibault Delavallée
<tde@openerp.com>
Tue, 28 Aug 2012 07:34:14 +0000
(09:34 +0200)
bzr revid: tde@openerp.com-
20120828073414
-lt4bpubxtv3235b6
openerp/tools/misc.py
patch
|
blob
|
history
diff --git
a/openerp/tools/misc.py
b/openerp/tools/misc.py
index
024d75f
..
f609981
100644
(file)
--- a/
openerp/tools/misc.py
+++ b/
openerp/tools/misc.py
@@
-395,6
+395,11
@@
def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=Non
cr.close()
return res
+def email_split(text):
+ """ Return a list of the email addresses found in ``text`` """
+ if not text: return []
+ return re.findall(r'([^ ,<@]+@[^> ,]+)', text)
+
#----------------------------------------------------------
# SMS
#----------------------------------------------------------