Skip to content

Commit

Permalink
Bcc as well
Browse files Browse the repository at this point in the history
  • Loading branch information
raboof committed Aug 30, 2023
1 parent 13ed038 commit 0ba4cc4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions server/endpoints/compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ async def process(
if session.credentials and session.credentials.authoritative:
subject = indata.get("subject")
cc = indata.get("cc")
bcc = indata.get("bcc")
body = indata.get("body")
irt = indata.get("in-reply-to")
references = indata.get("references")
Expand All @@ -68,6 +69,8 @@ async def process(
msg = email.message.EmailMessage()
if cc:
msg["Cc"] = cc
if bcc:
msg["Bcc"] = bcc
if irt:
msg["In-reply-to"] = irt
if references:
Expand Down
13 changes: 12 additions & 1 deletion webui/js/ponymail.js
Original file line number Diff line number Diff line change
Expand Up @@ -682,9 +682,10 @@ function compose_send() {
for (let k in mua_headers) {
content.push(k + "=" + encodeURIComponent(mua_headers[k]));
}
// Push the subject, cc and email body into the form data
// Push the subject, (b)cc and email body into the form data
content.push("subject=" + encodeURIComponent(document.getElementById('composer_subject').value));
content.push("cc=" + encodeURIComponent(document.getElementById('composer_cc').value));
content.push("bcc=" + encodeURIComponent(document.getElementById('composer_bcc').value));
content.push("body=" + encodeURIComponent(document.getElementById('composer_body').value));
if (G_ponymail_preferences.login && G_ponymail_preferences.login.alternates && document.getElementById('composer_alt')) {
content.push("alt=" + encodeURIComponent(document.getElementById('composer_alt').options[document.getElementById('composer_alt').selectedIndex].value));
Expand Down Expand Up @@ -786,6 +787,16 @@ function compose_email(replyto, list) {
type: 'text',
}));
form.push(new HTML('br'));
form.push(new HTML('b', {}, "Bcc:"));
form.push(new HTML('br'));
form.push(new HTML('input', {
style: {
width: '90%'
},
id: 'composer_bcc',
type: 'text',
}));
form.push(new HTML('br'));
form.push(new HTML('b', {}, "Reply:"));
form.push(new HTML('br'));
let body = new HTML('textarea', {
Expand Down

0 comments on commit 0ba4cc4

Please sign in to comment.