C
C#•2w ago
MrG

How Todo Email in C# Web API

I made this https://github.com/UmbrellaCrow612/PoliceCaseManagement/tree/master/src/infra/Email.Service and it does send emails if I use my Gmail app password and stuff but I wanted to know is this how companies do it as well and how can I scale it up etc ?
GitHub
PoliceCaseManagement/src/infra/Email.Service at master · UmbrellaCr...
Hub and Spoke pattern for PCMS. Contribute to UmbrellaCrow612/PoliceCaseManagement development by creating an account on GitHub.
11 Replies
Pobiega
Pobiega•2w ago
Generally, you don't use SmtpClient. What all the companies I've worked for has done is buy "email as a service" from another company and send emails via an API this solves issues like bouncing emails, scaling, blacklisted smtp servers, delivery status, retries, etc
MrG
MrGOP•2w ago
What would you reccomded ?
Pobiega
Pobiega•2w ago
Well, what kinda scale do you need? and are you willing to pay for it? using gmail via smtp is fine for testing, and as you have an interface for IEmailService you could easily create a SendgridEmailService or whatever
MrG
MrGOP•2w ago
I don't really Wana pay but in theory ha del like 1K emails per hour or more I'm not actually sending it anyone just Wana learn
Pobiega
Pobiega•2w ago
1K emails per hour will get your account flagged/banned very quickly using gmail 😛 thats a huge amount of emails to be sending and if you dont actually need to send any emails... dont?
MrG
MrGOP•2w ago
I Wana know how Todo emails I guess just buy a paid solution in real world then is what I'm getting
Pobiega
Pobiega•2w ago
yeah there are a TON of alternatives sendgrid, mailgun, mailchimp, amazon SES, sparkpost, postmark...
MrG
MrGOP•2w ago
Alternatives ? Oh
Pobiega
Pobiega•2w ago
yeah there are maaaaany companies offering email as a service
MrG
MrGOP•2w ago
Ok thanks for info
Pobiega
Pobiega•2w ago
np

Did you find this page helpful?