Skip to content

Scheduling infrastructure for absolutely everyone.

Small adjustments to the From behaviour, send as Calendso or via user depending on who you are sending to.

Alex van Andel4010fb907560
diff --git a/.env.example b/.env.example
index 1a77d8a30ce..e872c462f43 100644
--- a/.env.example
+++ b/.env.example
@@ -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/
# Configures the global From: header whilst sending emails.
-EMAIL_FROM='Calendso <[email protected]>'
+EMAIL_FROM='[email protected]'
# Configure SMTP settings (@see https://nodemailer.com/smtp/).
# Note: The below configuration for Office 365 has been verified to work.
diff --git a/lib/emails/confirm-booked.ts b/lib/emails/confirm-booked.ts
index 67e13b2f6bd..868ad001f13 100644
--- a/lib/emails/confirm-booked.ts
+++ b/lib/emails/confirm-booked.ts
@@ -31,7 +31,7 @@ const sendEmail = (calEvent: CalendarEvent, {
nodemailer.createTransport(transport).sendMail(
{
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')}`,
html: html(calEvent),
text: text(calEvent),
@@ -52,7 +52,7 @@ const html = (calEvent: CalendarEvent) => {
<div>
Hi ${calEvent.attendees[0].name},<br />
<br />
- Your ${calEvent.type} with ${calEvent.organizer.name} at ${inviteeStart.format('h:mma')}
+ Your ${calEvent.type} with ${calEvent.organizer.name} at ${inviteeStart.format('h:mma')}
(${calEvent.attendees[0].timeZone}) on ${inviteeStart.format('dddd, LL')} is scheduled.<br />
<br />
Additional notes:<br />
@@ -61,4 +61,4 @@ const html = (calEvent: CalendarEvent) => {
`;
};
-const text = (evt: CalendarEvent) => html(evt).replace('<br />', "\n").replace(/<[^>]+>/g, '');
+const text = (evt: CalendarEvent) => html(evt).replace('<br />', "\n").replace(/<[^>]+>/g, '');
\ No newline at end of file
diff --git a/lib/emails/new-event.ts b/lib/emails/new-event.ts
index dfb65e800e9..a7b92b8be94 100644
--- a/lib/emails/new-event.ts
+++ b/lib/emails/new-event.ts
@@ -66,7 +66,7 @@ const sendEmail = (calEvent: CalendarEvent, {
filename: 'event.ics',
content: icalEventAsString(calEvent),
},
- from,
+ from: `Calendso <${from}>`,
to: calEvent.organizer.email,
subject: `New event: ${calEvent.attendees[0].name} - ${organizerStart.format('LT dddd, LL')} - ${calEvent.type}`,
html: html(calEvent),