form = DocCommentForm(request.POST)
if form.is_valid():
send_template_mail(
- form.cleaned_data['email'],
+ settings.DOCSREPORT_NOREPLY_EMAIL,
settings.DOCSREPORT_EMAIL,
'%s' % form.cleaned_data['shortdesc'],
'docs/docsbugmail.txt', {
'details': form.cleaned_data['details'],
},
usergenerated=True,
+ cc=form.cleaned_data['email'],
+ replyto='%s, %s' % (form.cleaned_data['email'], settings.DOCSREPORT_NOREPLY_EMAIL),
)
return render_to_response('docs/docsbug_completed.html', {
}, NavContext(request, 'docs'))
from models import QueuedMail
-def send_simple_mail(sender, receiver, subject, msgtxt, attachments=None, usergenerated=False, cc=None):
+def send_simple_mail(sender, receiver, subject, msgtxt, attachments=None, usergenerated=False, cc=None, replyto=None):
# attachment format, each is a tuple of (name, mimetype,contents)
# content should be *binary* and not base64 encoded, since we need to
# use the base64 routines from the email library to get a properly
msg['From'] = sender
if cc:
msg['Cc'] = cc
+ if replyto:
+ msg['Reply-To'] = replyto
msg['Date'] = formatdate(localtime=True)
msg['Message-ID'] = make_msgid()
bugid = c.fetchall()[0][0]
send_template_mail(
- form.cleaned_data['email'],
+ settings.BUGREPORT_NOREPLY_EMAIL,
settings.BUGREPORT_EMAIL,
'BUG #%s: %s' % (bugid, form.cleaned_data['shortdesc']),
'misc/bugmail.txt',
},
usergenerated=True,
cc=form.cleaned_data['email'],
+ replyto='%s, %s' % (form.cleaned_data['email'], settings.BUGREPORT_EMAIL),
)
return render_to_response('misc/bug_completed.html', {
NOREPLY_FROM="someone@example.com" # Address to send unverified messages from
LISTSERVER_EMAIL="someone@example.com" # Address to majordomo
BUGREPORT_EMAIL="someone@example.com" # Address to pgsql-bugs list
+BUGREPORT_NOREPLY_EMAIL="someone-noreply@example.com" # Address to no-reply pgsql-bugs address
DOCSREPORT_EMAIL="someone@example.com" # Address to pgsql-docs list
+DOCSREPORT_NOREPLY_EMAIL="someone-noreply@example.com" # Address to no-reply pgsql-docs address
FRONTEND_SERVERS=() # A tuple containing the *IP addresses* of all the
# varnish frontend servers in use.
FTP_MASTERS=() # A tuple containing the *IP addresses* of all machines
from pgweb.util.helpers import template_to_string
import re
-def send_template_mail(sender, receiver, subject, templatename, templateattr={}, usergenerated=False, cc=None):
+def send_template_mail(sender, receiver, subject, templatename, templateattr={}, usergenerated=False, cc=None, replyto=None):
send_simple_mail(sender, receiver, subject,
template_to_string(templatename, templateattr),
- usergenerated=usergenerated, cc=cc)
+ usergenerated=usergenerated, cc=cc, replyto=replyto)
def get_client_ip(request):
"""
Your documentation comment has been received, and been posted to
the <a href="/list/pgsql-docs/">pgsql-docs</a> mailinglist. It will
show up there as soon as it has cleared the moderator queue.
+A copy of the comment has also been sent to your mailbox.
</p>
{%endblock%}
Your bug report has been received, and given id #{{bugid}}. It has been posted
to the <a href="/list/pgsql-bugs/">pgsql-bugs</a>
mailinglist and will show up there as soon as it has cleared the moderator
-queue.
+queue. A copy of the report has also been sent to your mailbox. If you need
+to add any further information to the report, please reply to that mail.
</p>
{%endblock%}