-
Notifications
You must be signed in to change notification settings - Fork 579
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
Forgot Password don't send a email #1060
Comments
The code you posted above looks different than the code in the NotificationJob:
If ToUserId has been specified for a Notification then the system retrieves the ToEmail and ToDisplayName from the User table. If ToUserId has not been specified for a Notification then the system expects that the ToEmail has been explicitly provided. |
Are you using the latest code in the dev branch? I am asking because there was an issue related to the Sender which was fixed recently in #1044 |
Me too I'm trying to send password, without success. I don't understand which 'address' is. |
My apologies.... after further research I was able to determine that the original API was modified to prevent the leakage of user information which caused an impact to the sending of notifications. The original API included joins from the Notification table to the User table - which is how the FromEmail and ToEmail properties were populated. These joins were removed in PR #581. Thank you for reporting this issue - I will submit a new PR to fix the problem. |
This should be fixed in #1065. The Notification API now relies on the ToEmail/ToDisplayName properties rather than ToUserId ( although if you only specify ToUserId and do not provide ToEmail/ToDisplayName it will retrieve them in the NotificationJob ). I also added some additional constructors to the Notification class to simplify the creation of objects and abstract the more internal properties. |
I confirm that now email to User Password Reset is sent succesfully. |
Sorry for mine late respons. But yes its working fine. The problem is solved. Thanks! |
Forgot Password or sending a notification to another user.
This has already been reported (and closed) but I am not getting it working.
When I look in the code I see that a notification has no ToEmail when the Job is executed and therefore no message can be sent (a mailadress need a valid email address).
However, the ToUserId is available.
It goes wrong on ines 86-90 in NotificationJob.cs:
if (notification.ToUserId! = null)
{
mailMessage.To.Add (new MailAddress (user.Email, user.DisplayName)); <--- Error
mailMessage.Body + = "To:" + user.DisplayName + "<" + user.Email + ">" + "\ n";
}
Is this a setting problem (do I something wrong) or else?
The text was updated successfully, but these errors were encountered: