Commit 1b050900 by Őry Máté

one: remove hardcoded email address

parent 4a98d32a
......@@ -259,7 +259,8 @@ FIREWALL_SETTINGS = {
"dns_ip": "152.66.243.60",
"dns_ttl": "300",
}
SITE_NAME = "IK Cloud"
DEFAULT_FROM_EMAIL = "noreply@cloud.ik.bme.hu"
EMAIL_HOST='152.66.243.92' # giccero ipv4
CLOUD_URL='https://cloud.ik.bme.hu/'
RELEASE = subprocess.check_output(['git', 'rev-parse', '--symbolic-full-name', '--abbrev-ref', 'HEAD'])
......
from celery.task import Task, PeriodicTask
from celery.task import Task
import logging
import celery
import os
import sys
import time
from django.core.mail import send_mail
from django.conf import settings
from one.models import Instance
logger = logging.getLogger(__name__)
class SendMailTask(Task):
def run(self, to, subject, msg, sender=u'noreply@cloud.ik.bme.hu'):
send_mail(subject, msg, sender, [ to ], fail_silently=False)
logger.info("[django][one][tasks.py] %s->%s [%s]" % (sender, to, subject) )
def run(self, to, subject, msg, sender=None):
if sender is None:
if settings.SITE_NAME:
sender = '"%s" <%s>' % (settings.SITE_NAME.replace('"', ''),
settings.DEFAULT_FROM_EMAIL)
else:
sender = settings.DEFAULT_FROM_EMAIL
send_mail(subject, msg, sender, [to, ], fail_silently=False)
logger.info("[django][one][tasks] %s->%s %s" % (sender, to, subject))
class UpdateInstanceStateTask(Task):
......
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 sign in to comment