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 Support to Send Emails from Back End Rather than using UseBasin Service #391

Open
SudharakaP opened this issue Jul 29, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@SudharakaP
Copy link
Member

Is your feature request related to a problem? Please describe.

Currently we are using UseBasin to send emails in our home page contact form. This has limitations and can only send 100 emails. We need to just send emails using our server. 😄

Describe the solution you'd like

Add a email sending functionality similar to what we have for password reset emails and registration email sending.

Additional context

UseBasin was used due to our need of developing a solution quickly; we would prefer to use our own email sending preferably as that will not impose any limits.

@SudharakaP SudharakaP added enhancement New feature or request help wanted Extra attention is needed labels Jul 29, 2020
@SudharakaP
Copy link
Member Author

@faithghlee : Please feel free to ask questions if you have any. We already send emails when users register and reset passwords; this will be a bit similar but the form data needs to be sent instead.

@SudharakaP
Copy link
Member Author

SudharakaP commented Jul 29, 2020

@faithghlee : Here's some additional info.

sendRequest(): Observable<any> {
return this.http.post<any>('https://usebasin.com/f/b5ed73d03aa5', this.contactForm.value, {
headers: new HttpHeaders({
Accept: 'application/json'
}),
observe: 'response'
});
}

  • So there's no back-end logic involved. What we have to do here is, remove this POST request to usebasin and instead replace it with a back-end POST request sending all the form information.

  • Then create the back end REST endpoint for handing this information; the rest endpoints are in the package; https://github.com/OpenArchitex/OpenLearnr/tree/develop/src/main/java/com/asanka/tutor/web/rest. Create a new class such as EmailResource.java and use the MailService.sendEmail method to send the emails.

  • Call this back end REST endpoint from the above sendRequest method.

  • There might be intermediary steps that are needed but that's what I can think about at this point in terms of the high level overview. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants