Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117759025
D581.1775210732.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D581.1775210732.diff
View Options
diff --git a/wallace/module_invitationpolicy.py b/wallace/module_invitationpolicy.py
--- a/wallace/module_invitationpolicy.py
+++ b/wallace/module_invitationpolicy.py
@@ -1161,7 +1161,6 @@
"""
global auth
- import smtplib
from email.MIMEText import MIMEText
from email.Utils import formatdate
from email.header import Header
@@ -1284,14 +1283,13 @@
msg['From'] = Header(utils.str2unicode('%s' % orgname) if orgname else '')
msg['From'].append("<%s>" % orgemail)
- modules._sendmail(orgemail, receiving_user['mail'], msg.as_string())
+ success = modules._sendmail(orgemail, receiving_user['mail'], msg.as_string())
log.debug(_("Sent update notification to %r: %r") % (receiving_user['mail'], success), level=8)
def send_cancel_notification(object, receiving_user, deleted=False, sender=None, comment=None):
"""
Send a notification about event/task cancellation
"""
- import smtplib
from email.MIMEText import MIMEText
from email.Utils import formatdate
from email.header import Header
@@ -1346,7 +1344,7 @@
msg['From'] = Header(utils.str2unicode('%s' % orgname) if orgname else '')
msg['From'].append("<%s>" % orgemail)
- modules._sendmail(orgemail, receiving_user['mail'], msg.as_string())
+ success = modules._sendmail(orgemail, receiving_user['mail'], msg.as_string())
log.debug(_("Sent cancel notification to %r: %r") % (receiving_user['mail'], success), level=8)
def is_auto_reply(user, sender_email, type):
diff --git a/wallace/module_resources.py b/wallace/module_resources.py
--- a/wallace/module_resources.py
+++ b/wallace/module_resources.py
@@ -1312,7 +1312,6 @@
"""
Send a reservation notification to the resource owner
"""
- import smtplib
from pykolab import utils
from email.MIMEText import MIMEText
from email.Utils import formatdate
@@ -1356,17 +1355,7 @@
resource['cn'], participant_status_label(status) if success else _('failed')
))
- smtp = smtplib.SMTP("localhost", 10027)
-
- if conf.debuglevel > 8:
- smtp.set_debuglevel(True)
-
- try:
- smtp.sendmail(resource['mail'], owner['mail'], msg.as_string())
- except Exception, e:
- log.error(_("SMTP sendmail error: %r") % (e))
-
- smtp.quit()
+ modules._sendmail(resource['mail'], owner['mail'], msg.as_string())
def owner_notification_text(resource, owner, event, success):
organizer = event.get_organizer()
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 3, 10:05 AM (14 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18775356
Default Alt Text
D581.1775210732.diff (2 KB)
Attached To
Mode
D581: Fix D577 patch bug - modules._sendmail result assign to variable, which is used to log the result of email sending.
Attached
Detach File
Event Timeline