- sender.append('<%s>' % unicode(settings.DEFAULT_FROM_EMAIL))
- sender = u'%s <%s>' % (unicode(settings.APP_SHORT_NAME), unicode(settings.DEFAULT_FROM_EMAIL))
+
+ if sender_data == None:
+ sender.append('<%s>' % unicode(settings.DEFAULT_FROM_EMAIL))
+ sender = u'%s <%s>' % (unicode(settings.APP_SHORT_NAME), unicode(settings.DEFAULT_FROM_EMAIL))
+ else:
+ sender.append('<%s>' % unicode(sender_data['email']))
+ sender = u'%s <%s>' % (unicode(sender_data['name']), unicode(sender_data['email']))
+
+
+ if reply_to == None:
+ reply_to = unicode(settings.DEFAULT_REPLY_TO_EMAIL)
+ else:
+ reply_to = unicode(reply_to)