Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add replyTo field to SendGrid provider and Email type #2045

Open
wants to merge 4 commits into
base: release
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions waspc/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.13.3 (TBD)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see that your forked main branch is 33 commits behind the main in our repo.

We are now working on 0.14.0 and you'll see the entries in the Changelog once you sync your branch with the main repo.


### 🎉 New features

- Wasp now supports the replyTo field in the emailSender.send method. This field allows you to specify the email address to which the recipient can reply to. This feature is only available for the SendGrid provider.

## 0.13.2 (2024-04-11)

### 🐞 Bug fixes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { SendGridProvider, EmailSender } from "../types";

// PRIVATE API
export function initSendGridEmailSender(
provider: SendGridProvider
provider: SendGridProvider
Copy link
Contributor

@infomiho infomiho May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this indent change to keep the changeset minimal.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, formatters at work I guess.

): EmailSender {
SendGrid.setApiKey(provider.apiKey);

Expand All @@ -18,6 +18,7 @@ export function initSendGridEmailSender(
email: fromField.email,
name: fromField.name,
},
replyTo: email.replyTo,
to: email.to,
subject: email.subject,
text: email.text,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export type Email = {
{=^ isDefaultFromFieldDefined =}
from: EmailFromField;
{=/ isDefaultFromFieldDefined =}
replyTo?: string;
to: string;
subject: string;
text: string;
Expand Down
4 changes: 4 additions & 0 deletions web/docs/advanced/email/email.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,10 @@ The `send` method accepts an object with the following fields:

The email address of the sender.

- `replyTo?: string`

The email address to which the recipient can reply to. Only available for SendGrid provider.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you analyze the other providers to see if they also provide options for replyTo field? We need to consider the SMTP and the Mailgun providers to make sure Wasp works for as many people as possible.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only checked the Mailgun provider which does not offer a reply_to option. I'm pretty sure, that it can be implemented for the SMTP provider as well. I will have a look at it.


- `to: string` <Required />

The recipient's email address.
Expand Down
Loading