aspnet / Templates

This repo is OBSOLETE - please see the README file for information
Other
150 stars 57 forks source link

IEmailSender should have explicitly named parameters for html vs plain text #868

Closed joeaudette closed 7 years ago

joeaudette commented 7 years ago

There have been a number of people reporting bugs about the email confirmation link in the StarterWeb template not working.

This is happening because people implement IEmailSender and don't realize that the message being passed in is html. When they send the email as plain text the confirmation link does not work because of the url encoding.

I think the "message" parameter of SendEmailAsync should be renamed to htmlMessage and possibly should have an additional parameter for "plainTextMessage" and both should be passed in from AccountController.

This would make it more clear to implementors of IEmailSender what kind of string(s) they are dealing with and how to correctly implement it.

related issues: https://github.com/aspnet/Home/issues/2152 https://github.com/aspnet/Home/issues/2217

Eilon commented 7 years ago

This issue was moved to aspnet/templating#79