Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Sending emails from a .NET API and Angular project

$
0
0

I'm learning to code by developing a project that uses Angular and .NET core for an API. I'm starting into a new area of this project that I'm hoping to get a little advice on as it a new area to me, and thats sending emails from the project.

There are 2 factions to the project:

A: Sending platform emails (IE: Registration emails, password resets, stuff the user requests from the Angular project)

B: Automatic reporting emails that contain data submitted to the project via a mobile app through the API.

For the platform emails, I understand this needs to be done in the Angular project itself. However, when someone submits data via the API with the use of a phone based app, an email should be sent to a designated person containing the data that was submitted. This last part is where I'm running into troubles figuring out what needs to be done.

I'm going to incorporate SendGrid into the project to handle all of the emails. However, what is the best practice to send the emails to the designated person when info is passed via a mobile app through the API? I'm going to assume this would be built in the API itself as it wouldn't be a user triggered event in the Angular project. In fact, the Angular project wouldn't even be aware that the data had been submitted.

Any advice on how I would tackle this? Would I build a trigger within the API that is tripped when the data is submitted that tells Sendgrid to send the email with the data? Would this be built within the .NET API? And how does one build an email template using just C#?

Thanks in advance for any input provided!


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>