forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathannounce-header-change
More file actions
executable file
·48 lines (39 loc) · 1.76 KB
/
announce-header-change
File metadata and controls
executable file
·48 lines (39 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/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>',
)