Send Emails with Blazor SSR (Static Server-Side Rendering) in .NET 8 🔥

  Рет қаралды 4,048

Patrick God

Patrick God

Күн бұрын

Пікірлер: 19
@saroshwadia
@saroshwadia 7 ай бұрын
when is the free "The .NET 8 Web Dev Jump-Start Course" going to be available? Thx
@deltaHawck6625
@deltaHawck6625 7 ай бұрын
thanks brother, i love your help , you are an excellent developer .
@samehgenah8067
@samehgenah8067 7 ай бұрын
Great job ; what about navigation animation
@TheQvisionsa
@TheQvisionsa 7 ай бұрын
Great! Do you have any plan for a video regarding Blazor SSR EditForm with elements changed using js?
@TheLastEmperorXiXinPig
@TheLastEmperorXiXinPig 6 ай бұрын
Great tutorial. But is the @code{} section running in the backend and secured, not able to be seen by the end-user in their client browsers?
@georgecarr7054
@georgecarr7054 2 ай бұрын
It's my understanding that..The @code section is in the client project. When a blazor application is served to the client the entire client project is sent to the user. This project is then ran locally on their machine in the browser using web assembly (which is basically JavaScript) Meaning that the code section you refer too will be able accessible and therefore any secret will not be safe Options for this security issue are 1.) ignore it and do it anyway. Weirdly this seems to be a common suggestion online but not something I would be comfortable with. 2.) store the secret in the configuration file. I haven't looked fully into this solution however it seems that you would need to do two things to make it fully secure Move the send email logic done in this video to an API. Then call that API endpoint from the client to handle the sending of the email through MailKit. This will sort the issue of the user having access to it. Then to avoid having your SMTP username and password in the code you would have to store this on a configuration file which you then reference in the API. This means that you wont commit any passwords to GIT if your project is open source. Sorry for the really long reply. Will reply to this with an example project once I am done figuring it out!
@georgecarr7054
@georgecarr7054 2 ай бұрын
Having looked at this more I'm incorrect! Patrick is not using Blazor WASM, he is using Blazor server
@AthelstanEngland
@AthelstanEngland Ай бұрын
​@@georgecarr7054thanks for updating your comment. Thought I was going mad!😂 Maybe worth deleting the first comment.
@simonedeste2528
@simonedeste2528 6 ай бұрын
Hello Patrick! Does this method for sending emails work even if I am developing an online app for a writers' website? And more importantly, can I transfer it to different projects I'm working on by simply modifying a template? (changing the logo, the email sender, etc.)
@amirameri1354
@amirameri1354 7 ай бұрын
Great 🎉. How can send html page with email ? I mean emails body incloudes style and css ?
@wusswuzz5818
@wusswuzz5818 7 ай бұрын
string message = $""" Hi there! """; var body = new BodyBuilder { HtmlBody = message }; email.Body = body.ToMessageBody();
@cas818028
@cas818028 7 ай бұрын
This is awesome, but I get concerned that in a team setting people could get confused of what’s running on the client and what’s running on the server since the code looks so similar. How can you guard against this? For example if this code were to accidentally ship to the client you would have exposed email smtp creds
@TheLastEmperorXiXinPig
@TheLastEmperorXiXinPig 6 ай бұрын
Good question, I had the same issue, I asked Bing Copilot and according to it the code section is running solely on the server side and is not exposed in the client's browser. But it would be great to get confirmation from some other source on this.
@georgecarr7054
@georgecarr7054 2 ай бұрын
@@TheLastEmperorXiXinPig I believe bing Copilot is incorrect here. Correct me if I'm wrong
@AthelstanEngland
@AthelstanEngland Ай бұрын
This is SSR so no C# code is sent to the browser.
@pablokoike
@pablokoike 6 ай бұрын
Thanks a lot! Very usefull. :)
@alialshreef2874
@alialshreef2874 6 ай бұрын
Thanks a lot 💯
@10Totti
@10Totti 7 ай бұрын
Good Tutorial!
@pezhmanpiramoun2997
@pezhmanpiramoun2997 7 ай бұрын
🤩
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
Sending Emails in ASP.NET Core using Gmail | Quick, Free and Easy
9:46
Programming with Felipe Gavilan
Рет қаралды 1,7 М.
GitHub Copilot Is NOW FREE for EVERYONE! (Live Demo)
17:56
Bilel MAROUEN
Рет қаралды 1,1 М.
Send emails for free using Gmail SMTP server from .net (c#) application
6:17
The Blazor Competitor is Here!
15:08
Nick Chapsas
Рет қаралды 76 М.
8 Free and Open Source Blazor UI Libraries
9:42
Claudio Bernasconi
Рет қаралды 45 М.
Why Every .NET Developer NEEDS Dependency Injection
10:00
Patrick God
Рет қаралды 12 М.
New .NET 9.0 Blazor Features!
9:17
The Code Wolf
Рет қаралды 16 М.
The Easiest Way to Create PDFs in .NET
9:47
Nick Chapsas
Рет қаралды 126 М.