49 lines
1.8 KiB
Python
Executable file
49 lines
1.8 KiB
Python
Executable file
#!/usr/bin/env python
|
|
|
|
import sys, os, sys
|
|
import datetime
|
|
|
|
# boilerplate
|
|
basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
|
|
sys.path = [ basedir ] + sys.path
|
|
os.environ["DJANGO_SETTINGS_MODULE"] = "ietf.settings"
|
|
|
|
virtualenv_activation = os.path.join(basedir, "env", "bin", "activate_this.py")
|
|
if os.path.exists(virtualenv_activation):
|
|
execfile(virtualenv_activation, dict(__file__=virtualenv_activation))
|
|
|
|
import django
|
|
django.setup()
|
|
|
|
from django.core import management
|
|
from django.template.loader import render_to_string
|
|
|
|
from ietf import settings
|
|
from ietf.utils.mail import send_mail_preformatted
|
|
from ietf.utils.mail import send_mail
|
|
|
|
target_date=datetime.date(year=2014,month=1,day=24)
|
|
|
|
send_mail(request = None,
|
|
to = "IETF-Announce <ietf-announce@ietf.org>",
|
|
frm = "The IESG <iesg-secretary@ietf.org>",
|
|
subject = "Upcoming change to announcement email header fields (using old header)",
|
|
template = "utils/header_change_content.txt",
|
|
context = dict(oldornew='old', target_date=target_date),
|
|
extra = {'Reply-To' : 'ietf@ietf.org',
|
|
'Sender' : '<iesg-secretary@ietf.org>',
|
|
}
|
|
)
|
|
|
|
send_mail(request = None,
|
|
to = "IETF-Announce:;",
|
|
frm = "The IESG <noreply@ietf.org>",
|
|
subject = "Upcoming change to announcement email header fields (using new header)",
|
|
template = "utils/header_change_content.txt",
|
|
context = dict(oldornew='new', target_date=target_date),
|
|
extra = {'Reply-To' : 'IETF Discussion List <ietf@ietf.org>',
|
|
'Sender' : '<iesg-secretary@ietf.org>',
|
|
},
|
|
bcc = '<ietf-announce@ietf.org>',
|
|
)
|