Commit d552ecb7 authored by Antony Chazapis's avatar Antony Chazapis
Browse files

No parameter in email addresses.

parent f36af44a
......@@ -253,7 +253,7 @@ def _send_verification(request, user, template_name):
'url': url,
'baseurl': BASEURL,
'site_name': site.name,
'support': DEFAULT_CONTACT_EMAIL % site.name.lower()})
sender = DEFAULT_FROM_EMAIL % site.name
'support': DEFAULT_CONTACT_EMAIL
sender = DEFAULT_FROM_EMAIL
send_mail('%s account activation' % site.name, message, sender, [user.email])
logger.info('Sent activation %s', user)
......@@ -231,6 +231,6 @@ class ExtendedPasswordResetForm(PasswordResetForm):
'user': user,
'token': token_generator.make_token(user)
}
from_email = DEFAULT_FROM_EMAIL % SITENAME
from_email = DEFAULT_FROM_EMAIL
send_mail(_("Password reset on %s") % SITENAME,
t.render(Context(c)), from_email, [user.email])
......@@ -59,8 +59,8 @@ def activate(user, email_template_name='welcome_email.txt'):
'url': SITEURL,
'baseurl': BASEURL,
'site_name': SITENAME,
'support': DEFAULT_CONTACT_EMAIL % SITENAME.lower()})
sender = DEFAULT_FROM_EMAIL % SITENAME
'support': DEFAULT_CONTACT_EMAIL
sender = DEFAULT_FROM_EMAIL
send_mail(subject, message, sender, [user.email])
logger.info('Sent greeting %s', user)
......@@ -92,9 +92,9 @@ def invite(inviter, username, realname):
'url': url,
'baseurl': BASEURL,
'service': SITENAME,
'support': DEFAULT_CONTACT_EMAIL % SITENAME.lower()})
sender = DEFAULT_FROM_EMAIL % SITENAME
'support': DEFAULT_CONTACT_EMAIL
sender = DEFAULT_FROM_EMAIL
send_mail(subject, message, sender, [invitation.username])
logger.info('Sent invitation %s', invitation)
inviter.invitations = max(0, inviter.invitations - 1)
inviter.save()
\ No newline at end of file
inviter.save()
......@@ -23,8 +23,8 @@ INVITATIONS_PER_LEVEL = getattr(settings, 'ASTAKOS_INVITATIONS_PER_LEVEL', {
})
# Address to use for outgoing emails
DEFAULT_FROM_EMAIL = getattr(settings, 'ASTAKOS_DEFAULT_FROM_EMAIL', '%s <no-reply@grnet.gr>')
DEFAULT_CONTACT_EMAIL = getattr(settings, 'ASTAKOS_DEFAULT_CONTACT_EMAIL', 'support@%s.grnet.gr')
DEFAULT_FROM_EMAIL = getattr(settings, 'ASTAKOS_DEFAULT_FROM_EMAIL', 'GRNET Cloud <no-reply@grnet.gr>')
DEFAULT_CONTACT_EMAIL = getattr(settings, 'ASTAKOS_DEFAULT_CONTACT_EMAIL', 'support@cloud.grnet.gr')
# Identity Management enabled modules
IM_MODULES = getattr(settings, 'ASTAKOS_IM_MODULES', ['local', 'twitter', 'shibboleth'])
......@@ -48,4 +48,4 @@ SITEURL = getattr(settings, 'ASTAKOS_SITEURL', 'http://pithos.dev.grnet.gr/im')
BASEURL = getattr(settings, 'ASTAKOS_BASEURL', 'http://pithos.dev.grnet.gr')
# Set service name
SITENAME = getattr(settings, 'ASTAKOS_SITENAME', 'Pithos+')
SITENAME = getattr(settings, 'ASTAKOS_SITENAME', 'GRNET Cloud')
......@@ -353,7 +353,7 @@ def send_feedback(request, template_name='im/feedback.html', email_template_name
if form.is_valid():
subject = _("Feedback from %s" % SITENAME)
from_email = request.user.email
recipient_list = [DEFAULT_CONTACT_EMAIL % SITENAME.lower()]
recipient_list = [DEFAULT_CONTACT_EMAIL]
content = render_to_string(email_template_name, {
'message': form.cleaned_data['feedback_msg'],
'data': form.cleaned_data['feedback_data'],
......
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