datatracker/ietf/bin/announce-header-change
Robert Sparks e3d9fbabb1 Moved the target date for ending the ietf-announce header changes forward since we missed the start date.
Commit ready for merge.
Ryan - could you apply this to the current production branch as a patch and start a cron job that runs this file daily until the 24th please?
 - Legacy-Id: 7085
2014-01-08 18:56:25 +00:00

38 lines
1.4 KiB
Python
Executable file

#!/usr/bin/env python
import datetime
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
management.setup_environ(settings)
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>',
)