Small adjustments to the From behaviour, send as Calendso or via user depending on who you are sending to.
This commit is contained in:
parent
89cefa9894
commit
4010fb9075
3 changed files with 5 additions and 5 deletions
|
@ -15,7 +15,7 @@ MS_GRAPH_CLIENT_SECRET=
|
||||||
# allow access to the nodemailer transports from the .env file. E-mail templates are accessible within lib/emails/
|
# allow access to the nodemailer transports from the .env file. E-mail templates are accessible within lib/emails/
|
||||||
|
|
||||||
# Configures the global From: header whilst sending emails.
|
# Configures the global From: header whilst sending emails.
|
||||||
EMAIL_FROM='Calendso <notifications@yourselfhostedcalendso.com>'
|
EMAIL_FROM='notifications@yourselfhostedcalendso.com'
|
||||||
|
|
||||||
# Configure SMTP settings (@see https://nodemailer.com/smtp/).
|
# Configure SMTP settings (@see https://nodemailer.com/smtp/).
|
||||||
# Note: The below configuration for Office 365 has been verified to work.
|
# Note: The below configuration for Office 365 has been verified to work.
|
||||||
|
|
|
@ -31,7 +31,7 @@ const sendEmail = (calEvent: CalendarEvent, {
|
||||||
nodemailer.createTransport(transport).sendMail(
|
nodemailer.createTransport(transport).sendMail(
|
||||||
{
|
{
|
||||||
to: `${calEvent.attendees[0].name} <${calEvent.attendees[0].email}>`,
|
to: `${calEvent.attendees[0].name} <${calEvent.attendees[0].email}>`,
|
||||||
from,
|
from: `${calEvent.organizer.name} <${from}>`,
|
||||||
subject: `Confirmed: ${calEvent.type} with ${calEvent.organizer.name} on ${inviteeStart.format('dddd, LL')}`,
|
subject: `Confirmed: ${calEvent.type} with ${calEvent.organizer.name} on ${inviteeStart.format('dddd, LL')}`,
|
||||||
html: html(calEvent),
|
html: html(calEvent),
|
||||||
text: text(calEvent),
|
text: text(calEvent),
|
||||||
|
|
|
@ -66,7 +66,7 @@ const sendEmail = (calEvent: CalendarEvent, {
|
||||||
filename: 'event.ics',
|
filename: 'event.ics',
|
||||||
content: icalEventAsString(calEvent),
|
content: icalEventAsString(calEvent),
|
||||||
},
|
},
|
||||||
from,
|
from: `Calendso <${from}>`,
|
||||||
to: calEvent.organizer.email,
|
to: calEvent.organizer.email,
|
||||||
subject: `New event: ${calEvent.attendees[0].name} - ${organizerStart.format('LT dddd, LL')} - ${calEvent.type}`,
|
subject: `New event: ${calEvent.attendees[0].name} - ${organizerStart.format('LT dddd, LL')} - ${calEvent.type}`,
|
||||||
html: html(calEvent),
|
html: html(calEvent),
|
||||||
|
|
Loading…
Reference in a new issue