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

Provide a default From Email for Email Template configuration #262

Closed
engineertdog opened this issue Aug 9, 2019 · 7 comments
Closed

Provide a default From Email for Email Template configuration #262

engineertdog opened this issue Aug 9, 2019 · 7 comments
Assignees
Labels
Milestone

Comments

@engineertdog
Copy link

Default Email Templates - From Email

Problem

When you first set up email in the FA UI, you then have to go and manually change the From email for all of the templates.

Solution

I think that by default, the templates should use the email set in the SMTP settings, but be configurable so that email templates can use another email if requested. However, I think that utilizing the default email set in the SMTP settings would suffice in a majority of cases because this should be a general informational email address for the authentication service.

Alternatives/workarounds

One alternative would be to be able to test send any email template by providing an email address to send the test to. The result would be a full log of how the test went. This could also suffice as another feature request as it would be something desirable to see. Tests like these can be found in many applications, and I think it would be another benefit, in addition to the original FR.

How to vote

Please give us a thumbs up or thumbs down as a reaction to help us prioritize this feature. Feel free to comment if you have a particular need or comment on how this feature should work.

@robotdan
Copy link
Member

I think that by default, the templates should use the email set in the SMTP settings, but be configurable so that email templates can use another email if requested.

There is not currently an email address in the SMTP settings, the username may be an email address in some cases, but not necessarily.

We could perhaps add a default "From address" that would be used by all templates by default that would be defined in the "global" email configuration unless otherwise overridden per template.

One alternative would be to be able to test send any email template by providing an email address to send the test to. The result would be a full log of how the test went.

This is in plan, we intend to have a test button on the SMTP configuration, and then at some point within the email template UI have an option to send any particular template to an email address. We would either provide the output as a result of the action, or send the results to the event log.

Thanks for the feedback and suggestions.

@robotdan robotdan changed the title Email Templates Provide a default From Email for Email Template configuration Aug 10, 2019
@robotdan robotdan self-assigned this Aug 10, 2019
@engineertdog
Copy link
Author

I think that by default, the templates should use the email set in the SMTP settings, but be configurable so that email templates can use another email if requested.

There is not currently an email address in the SMTP settings, the username may be an email address in some cases, but not necessarily.

We could perhaps add a default "From address" that would be used by all templates by default that would be defined in the "global" email configuration unless otherwise overridden per template.

Ah you're right. I never thought about it because in my implementations, the username is always an email. I forgot about instances where that's not the case. I think that would be an easily suitable solution.

One alternative would be to be able to test send any email template by providing an email address to send the test to. The result would be a full log of how the test went.

This is in plan, we intend to have a test button on the SMTP configuration, and then at some point within the email template UI have an option to send any particular template to an email address. We would either provide the output as a result of the action, or send the results to the event log.

That sounds good to me!

@robotdan
Copy link
Member

We could also think about adding a default base URL that could be made available in the email templates.

That way could ship the email templates with a URL value of ${baseURL}/email/verify/${verificationId} instead of http://localhost:9011/email/verify/${verificationId}.

See this suggestion from https://github.com/tauinger-de via issue #294

@MrKanthaliya
Copy link

Is this feature got implemented? I am still getting emails from userrname mentioned SMTP configuration instead of 'From Email' in email templates.

@voidmain
Copy link
Member

voidmain commented Feb 4, 2020

@MrKanthaliya this could be caused by your SMTP server. FusionAuth sends a MIME email to the SMTP server with the From header in the format from-name <from-email>. The SMTP server might be removing this and replacing it with your SMTP username.

@MrKanthaliya
Copy link

MrKanthaliya commented Feb 5, 2020

Hi @voidmain , just tested with sendgrid. works fine with smtp.sendgrid.net but getting same issue with smtp.gmail.com.
Is there any alternative for smtp.gmail.com?

@voidmain
Copy link
Member

voidmain commented Feb 5, 2020

Ah. Gmail isn't technically a general purpose SMTP server. It only allows you to send mail as a single Gmail user. Therefore, Gmail will likely ignore some of the email headers coming in. Sounds like they are ignoring the From header.

Sendgrid is a better solution for sending emails to users. You can also use the AWS SES. Most cloud providers have an email service as well. These services are designed to send emails from applications and backend services, so they will support all the headers.

@robotdan robotdan added this to Backlog in FusionAuth Issues via automation Mar 17, 2020
@robotdan robotdan moved this from Backlog to In progress in FusionAuth Issues Mar 17, 2020
@robotdan robotdan added this to the 1.16.0 milestone Mar 17, 2020
@robotdan robotdan moved this from In progress to Code complete in FusionAuth Issues Apr 17, 2020
@robotdan robotdan moved this from Code complete to Done in FusionAuth Issues May 9, 2020
@robotdan robotdan closed this as completed May 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
FusionAuth Issues
  
Delivered
Development

No branches or pull requests

4 participants