Тёмный

Sending Email in C# using FluentEmail 

IAmTimCorey
Подписаться 421 тыс.
Просмотров 90 тыс.
50% 1

Опубликовано:

 

27 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 307   
@haithamkarim9755
@haithamkarim9755 3 года назад
The best thing about Tim's tutorial is that he doesn't tell you do this and that but he explain why he is doing each step. Thanks Tim for the great work. Really useful.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
We are glad you found it useful and that you like Tim's approach. He strives hard to educate, not just demonstrate.
@IAmTimCorey
@IAmTimCorey 3 года назад
I am glad it was so useful.
@johnmccallpepper7274
@johnmccallpepper7274 3 года назад
He saves me often
@mavlonodev
@mavlonodev Год назад
+
@TheMegaloYT
@TheMegaloYT 3 года назад
I am a self-taught programmer and until now I have always avoided working with emailing with C#. With FluentEmail and your explanation on how to use it, I'm no longer hesitant about incorporating emailing functionality into my personal projects. Thank you.
@IAmTimCorey
@IAmTimCorey 3 года назад
Great to hear!
@digestingpuma5597
@digestingpuma5597 3 года назад
Love the way he talks and explains things. Also, from every video, you can grab bunch of "unrelated", but very helpful tips and hints .
@IAmTimCorey
@IAmTimCorey 3 года назад
Thanks!
@lukoppc
@lukoppc 3 года назад
Wow, your videos are longer than the others but watching them makes me learn for true and understand the hole thing. Thank you very much.
@IAmTimCorey
@IAmTimCorey 3 года назад
My approach is to teach for the real world. That includes best practices, what to avoid, and how to integrate it into actual projects. That takes longer but, as you have seen, provides a lot more value.
@maxjustmax521
@maxjustmax521 3 года назад
the best setting I've changed in my VS IDE was the: Display inline parameter name hints, as this explains a lot for me as a new learner all thanks to how your code looks like in the video! I always wondered how does Tim have the name of the parameter displayed as hints in the code! well thank you so much for motivating me to find it in settings
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Thanks for sharing. I'm sure this will motivate others to explore and tweak their settings also.
@JaroslavFurman
@JaroslavFurman 3 года назад
Was looking if somebody commented on this.
@maxjustmax521
@maxjustmax521 3 года назад
@@JaroslavFurman I hope you got the answer you need.
@edotk4479
@edotk4479 3 года назад
You are a saviour man,I was working on a worker service with the same FluentEmail package.I was just confused about using Renderer.This video saved me .Thanks for the video :)
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
We are really glad it helped! Thanks for sharing.
@thomstunes6485
@thomstunes6485 3 года назад
Tim, you're content is just amazing, and by far the best on youtube. Ice on the cake, it's free ! Here's a little suggestion : could you add in your tutorials a section about commons bugs and crashes and how to fix them. Note that this is not related to this particuliar video, i've not tried it yet :)
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Tim does cover bug fixes in some of his full app development projects, like Tournament tracker and TimCo. Still, I did capture your suggestion on Tim's viewer suggestions list. Thanks for sharing.
@thomstunes6485
@thomstunes6485 3 года назад
@@tomthelestaff-iamtimcorey7597 Yep, it happened to me following one of tim's tutorial... had a really shitty bug and it took me 2 days to find the aswer on the web... so it would be nice :)
@jedidiahmay2092
@jedidiahmay2092 3 года назад
This is absolutely, exactly what I was looking for. Thanks much!
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Check out all 200+ videos from Tim to find the topics you are looking for.
@NetMistro
@NetMistro 3 года назад
Thanks, Tim for all your videos. They really help!
@IAmTimCorey
@IAmTimCorey 3 года назад
You are welcome.
@RalfsBalodis
@RalfsBalodis 3 года назад
0:00 - Intro 1:00 - Creating Demo Console App 3:46 - FluentEmail NuGet reference 6:08 - Establishing Emali server 8:05 - Sending e-mail to directory 15:19 - Email variable explained 16:12 - View the email 17:10 - Send email to papercut smtp app 19:12 - Email body template: FluentEmlai Razor NuGet 27:53 - Summary and concluding remarks
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Ralfs, Thank you so very much, I will move this over immediately. We know how much this work helps the rest of the community. Tim truly appreciates your work on this.
@jasonwellsnorris
@jasonwellsnorris 3 года назад
@@tomthelestaff-iamtimcorey7597 I believe "FluentEmlai" would be a typo.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
@@jasonwellsnorris Thanks for the heads up. That slipped past me.
@TheBausahab
@TheBausahab 3 года назад
Thank you Sir; I found every phrase extremely useful said by you.. Thanks for sharing your valuable Experience among us...
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Thank you for sharing.
@vitorarchanjovasconcelosch1444
@vitorarchanjovasconcelosch1444 3 года назад
Amazing as always!! Please, make a video about TDD Tim, would be fantastic!
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Tim addresses TDD in his Unit testing video - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ub3P8c87cwk.html
@vitorarchanjovasconcelosch1444
@vitorarchanjovasconcelosch1444 3 года назад
Thank you, I will definitely watch!
@dyakobaram
@dyakobaram 3 года назад
hello Mr Tim, have you thought about creating community polls on youtube for your upcoming videos so we can vote for your next tutorials?
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
We have discussed that a couple times. Tim is actually exploring multiple options, at the moment, to handle getting viewer feedback. Stay tuned and watch the newsletter for more info.
@chrisreddy3926
@chrisreddy3926 3 года назад
Another fantastic video and a real gem for improving my toolbox. I'd really like to see how you'd add bootstrap to the email template and include tables with foreach from a model
@IAmTimCorey
@IAmTimCorey 3 года назад
You won't be able to add Bootstrap because external CSS files are not allowed in email. You have a limited ability to embed CSS in an email, but it gets tricky fast.
@haroldpepete
@haroldpepete 3 года назад
you explain clear and good, thank for share with us, God bless you
@IAmTimCorey
@IAmTimCorey 3 года назад
You are welcome.
@rsifodias5
@rsifodias5 3 года назад
Great video! Having done a bit of business email logic, I would like to add 2 disclaimers: This is great for emails from your own domain, but you'll have to create your own Gmail or Outlook ISender implementation if you want to securely use those platforms. Gmail and Outlook have limited access to their SMTP, and prefer if you use their REST APIs. The other thing is that email HTML is more restricted than web HTML. Obviously JS isn't allowed, but there's other things to. Just know that your email won't come out the same as your liquid template.
@IAmTimCorey
@IAmTimCorey 3 года назад
I've used Google's SMTP servers without an issue using a personal gmail account. Outlook isn't an email server, it is an email client. If you mean Microsoft's servers (Outlook.com), then you can send through there as well. You just need the correct SMTP settings and the username and password. As for the template, my email will format just fine in HTML. There is no JavaScript in it. It renders as plain HTML.
@rsifodias5
@rsifodias5 3 года назад
@@IAmTimCorey Sorry, you're right about SMTP; I was talking about my experiences with the business SMTP gmail service. For personal emails, I believe SMTP is perfectly fine, though there is an issue for older clients - Google restricted authentication from weak-password accounts. Please see this issue: stackoverflow.com/questions/20906077/gmail-error-the-smtp-server-requires-a-secure-connection-or-the-client-was-not?rq=1 However, email HTML is a whole another can of worms. It took me months to figure out that most email clients to not support CSS3 features. Or background images. Or animations. Or flexbox. Its fine if you're HTML isn't complex, but I wanted to tell users if you're going to write ads or newsletters, you're better off using a templating language like MJML, then writing the razor syntax before you submit the email.
@gileee
@gileee 5 месяцев назад
@@rsifodias5 Just use an AppPassword generated for you notifications gmail account if you want access from an "insecure app" as they call it, and use that instead of your regular password. SMTP should work just fine after that, granted if you don't go over their pretty strict email limits. Just make sure you have 2-step enabled, because it's a requirement to use AppPasswords. Using their API with the Google.Apis.Auth (OAuth2) and Google.Apis.Gmail really is only used with service accounts and when you need to change account settings through your app and other things like that. Not really intended just for sending an email once in a while from what I understand.
@Comphonia
@Comphonia 3 года назад
I was really hoping you'd use the paper cut SMTP you mentioned in the top 10 tools. And boom! You did 😁. Thanks!
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Tim does try to be consistent! Thanks for being a part of this great community and sharing you thoughts.
@jlitodelcid326
@jlitodelcid326 3 года назад
Very good video
@IAmTimCorey
@IAmTimCorey 3 года назад
Thanks.
@abdallabenomran6809
@abdallabenomran6809 3 года назад
the best man in USA thank you
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Just the USA? LOL
@abdallabenomran6809
@abdallabenomran6809 3 года назад
@@tomthelestaff-iamtimcorey7597 loool
@StudentCompanion
@StudentCompanion 3 года назад
Thanks a aging Tim, could also consider a video to receive emails? Really appreciated.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Thanks, I added that to his list of viewer suggestions for video topics. Long list!
@medupiramaboea7742
@medupiramaboea7742 2 года назад
Can I please get an example of a rich Razor template, something that can be used for send styled emails to clients.
@IAmTimCorey
@IAmTimCorey 2 года назад
Thanks for the suggestion. Please add it to the list on the suggestion site so others can vote on it as well: suggestions.iamtimcorey.com/
@Yodigity
@Yodigity 3 года назад
Really great video Tim. I had one request, I'd be interested to see how you would work with XML. I understand JSON is generally more accepted, but I noticed some places are still a fan of XML. 🙂
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
I noted your recommendation by adding it to Tim's list of possible future topics, thanks.
@captainalpha4853
@captainalpha4853 3 года назад
Thanks Tim!
@Sprintsolutions
@Sprintsolutions 2 года назад
how to send automatic emails on predefined timeline and given email addressess
@dmytrohryshyn
@dmytrohryshyn 3 года назад
Thank you, as always lovely lesson. Would you consider to cover sending SMS message via C#, there are a lots of topics but I found this topic a bit hard for me, but it is essential skill for a good developer. Interesting to hear your thoughts.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Thanks for the suggestion. I have added it to Tim's list of possible future topics.
@Osbornesupremacy
@Osbornesupremacy 3 года назад
Any thoughts on MailKit vs. FluentEmail ?
@Osbornesupremacy
@Osbornesupremacy 3 года назад
okay, it looks like MailKit is a dependency of FluentEmail. What exactly does FluetEmail add to MailKit -- template support and syntactic sugar?
@IAmTimCorey
@IAmTimCorey 3 года назад
You are correct in your assumptions. FluentEmail makes MailKit simpler to use (fluent) and supports nice templates (plus some other smaller bonuses).
@chacataplan
@chacataplan Год назад
I have a problem, I want to send different emails to each user but the first user receives the 3 emails, use foreach to iterate with each user, what am I doing wrong, regards
@IAmTimCorey
@IAmTimCorey Год назад
I can't be certain what you are doing wrong, but this is an excellent time to practice your debugging skills. You will learn more by debugging this problem than you would by getting the answer.
@mrmoinn
@mrmoinn 3 года назад
So if I change localhost to Gmail.com it'll send through Gmail? How do I authenticate myself, though? I'm a bit confused..
@maxjustmax521
@maxjustmax521 3 года назад
var client = new SmtpClient("smtp.gmail.com", 587) { Credentials = new NetworkCredential("YourMail@gmail.com", "YourPassword"), EnableSsl = true }; in order for that to work you will need to change your gmail account security to let your C# application access your mail (on your own risk!) go to gmail account -> security - Allow less secure apps: ON
@joshuapoitras2099
@joshuapoitras2099 3 года назад
@@maxjustmax521 What else did you end up changing as far as creating the email itself?
@Ultimate_Cubchoo
@Ultimate_Cubchoo 3 года назад
Thank you now I can send a worm to people I don't like👍
@Ultimate_Cubchoo
@Ultimate_Cubchoo 3 года назад
This is a joke, trust me I'm retarded
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Sending you my mothers "Don't you dare" stare.
@DaNoob_777
@DaNoob_777 3 года назад
Thanks!
@IAmTimCorey
@IAmTimCorey 3 года назад
Thank you!
@pierreplourde
@pierreplourde 2 года назад
Bacon-wrapped bacon: I like the way you think! How do you make bacon better? Add bacon bits!
@IAmTimCorey
@IAmTimCorey 2 года назад
True.
@user-oi2kd6kv8v
@user-oi2kd6kv8v 2 года назад
Thanks for this Great video and great explanation, is this method work for sending and receiving emails from exchange server using SSL /TLS. How..?
@abhishekjadhav9289
@abhishekjadhav9289 Год назад
Thank you Tim for the important video on email. Does fluent razor work with .Net 6 worker service project ? Can we include attachments with fluent smpt ?
@windowsbuilderthegreat3121
@windowsbuilderthegreat3121 3 года назад
Could you do a video explaining when to use structs and classes when using graphical/console applications
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Thanks for the video suggestion. I have added it to Tim's list.
@mashanoushad8386
@mashanoushad8386 2 года назад
Hi Tim,this tutorial is so great.How can i add an inline image for email with Fluent razor.
@nathanzimmerman8422
@nathanzimmerman8422 Год назад
I need to send mail to a list of recipients selected from a sql server table. Can you show how?
@IAmTimCorey
@IAmTimCorey Год назад
Break the problem down into steps. This video shows you how to send an email. That's a step. Now figure out how to get data out of SQL (there are videos on this channel for that if you need help). Then figure out how to loop over your data and call the email method. Put it all together and you are set.
@parsamoomkesh1346
@parsamoomkesh1346 3 года назад
Hi Tim. Thanks. Great as always. Could you make a video specifically about smtp and all this stuff?
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Thanks for the suggestion, I added it to Tim's viewer Suggestions List.
@krish99977
@krish99977 6 месяцев назад
how to create .msg files with dynamic attachments
@kanatej
@kanatej 3 года назад
Thank you. It is a very good VDO.It can be applied easily. I have a question.Can FluentEmail attach file ?
@arunjoshi7885
@arunjoshi7885 3 года назад
Which extension you use for specificy method argument ,like name ,to
@rolandomedina7140
@rolandomedina7140 3 года назад
I was going to ask the same
@IAmTimCorey
@IAmTimCorey 3 года назад
That's the FluentEmail system. It created those extension methods.
@arunjoshi7885
@arunjoshi7885 3 года назад
@@IAmTimCorey can you please make a video on, which extensions you are using in visual studio.
@asendall
@asendall 3 года назад
I think this is what you are after Tools > Options > Text Editor > C# > Advanced and select Display inline parameter name hints (experimental).
@arunjoshi7885
@arunjoshi7885 3 года назад
@@asendall thanks for this
@eduardosoto8563
@eduardosoto8563 3 года назад
Like always excellent content! Could you do a dev series questions video on how to do code reviews? I’m wondering what are best practice and how to do a meaningful code review/pull request.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Thanks for the great suggestion. I have added it to Tim's list of requested future topics.
@essamsalah829
@essamsalah829 3 года назад
why every time I watch aTim video in a specific subject a learn smth new in another subject, thanks Tim
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Tim is an amazing educator. He always tries to show how the topic he is teaching about relates to other key topics. Thanks for sharing.
@WTHBrou
@WTHBrou 3 года назад
How would you setup this Console Application to run as a service or complement with an API. Core Server. Use this to handle Email Confirmations from Register/Lost Account routes functions.
@hieuvo8460
@hieuvo8460 2 года назад
Does it offer email encryption?
@dyakobaram
@dyakobaram 3 года назад
"build-in email system is being deprecated in .net 5" so what is the alternative? what does FluentEmail use?
@chrisharvey4364
@chrisharvey4364 3 года назад
Would like to know the answer to this too, as I'm struggling to send an email to SMTP server that uses Implicit TLS 1.2 connection. .NET Framework doesn't support it and it is deprecated in early .NET Core versions and will not be available in newer versions. Sending email is getting much harder - for example - Google Mail is now Implicit only so you cannnot use these classes anymore and need to find alternatives
@valeriesimpleton2525
@valeriesimpleton2525 3 года назад
MailKit
@Jay-Dee
@Jay-Dee 3 года назад
Didn't knew that. Good to know since we are about to make te switch from FW4.8 to Net5
@florianvandillen
@florianvandillen 3 года назад
Nowadays all transactional email is sent via services such as Sendgrid and Mailgun. You basically fire off API calls to the services and all email related handling is abstracted away from you.
@Vptkvc
@Vptkvc 3 года назад
@@florianvandillen That is simply not true. Especially not for large organizations, and their intranet
@tipmaleewangwon1292
@tipmaleewangwon1292 3 года назад
would you mind explain why FluentEmail.smtp is secure , but why do microsoft official doc marks it as obsolete and recommends against using it ? ,thanks
@IAmTimCorey
@IAmTimCorey 3 года назад
Being obsolete doesn't mean not secure. I showed off the simple SMTP because it is something you can do with the built-in tools. The other options (MailKit, etc.) will work the same way, just using those other systems for the actual sending of the email.
@tipmaleewangwon1292
@tipmaleewangwon1292 3 года назад
@@IAmTimCorey Thanks so much
@sruthivasudevan960
@sruthivasudevan960 2 года назад
Hi Tim, Excellent Tutorial. I am getting the following error when I tried to use local host and port 25. Any thoughts? No connection could be made because the target machine actively refused it. [::1]:25
@pathumniroshan6145
@pathumniroshan6145 3 года назад
Thank you Tim, Would you also be able to do a video on How to send Whatsapp and Text messages too. Appreciate it.
@IAmTimCorey
@IAmTimCorey 3 года назад
I can add that to the suggestion list.
@AhmadAlMutawa_abunoor
@AhmadAlMutawa_abunoor 3 года назад
Which version of visual studio do you use? and are using the default version of c# that comes with it? or did you upgrade? I am only asking because I keep seeing argument labels inserted with method calls automatically. Is there an option to do that?
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Tim talks a lot about Visual Studio and how he uses it. You may want to check out some of what he covers - ru-vid.comsearch?query=visual
@AhmadAlMutawa_abunoor
@AhmadAlMutawa_abunoor 3 года назад
@@tomthelestaff-iamtimcorey7597 I had to watch several videos hoping to spot where I can configure my Visual Studio to automatically display named arguments, but failed. I even searched google and RU-vid for named arguments in c#. all of the results talk about the possibility of calling methods using named arguments, but none of them tells how visual studio automatically inserts named arguments for you if you don't specify that.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
@@AhmadAlMutawa_abunoor I caught Tim and managed to get the following for you. I hope it helps: "I'm using the standard Visual Studio 2019 Community Edition with no additional plug-ins except the font resizer. The label option is a new feature that I explain here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-f0YeVirKPfw.html (note the time code is included)."
@AhmadAlMutawa_abunoor
@AhmadAlMutawa_abunoor 3 года назад
@@tomthelestaff-iamtimcorey7597 Thanks a lot. I have Visual Studio 2019 Community Edition Version 16.10. The feature is not included anymore. I guess they decided to remove it (hence the "experimental" tag in VS version 16.08 ) I searched all settings for (inline parameter name hints) but found none, and nothing else that accomplishes the same feature.
@abhishekjadhav9289
@abhishekjadhav9289 Год назад
Hi Tim, In my application I have two choices to go for implementing Email functionality. First option is sending email using Mail kit (that I have used before) and other option is to send using Azure Communication Services (completely new for me). I am confused and would like to know your expert opinion is which one is better than the other and why ? Thank you in advance.
@IAmTimCorey
@IAmTimCorey Год назад
Thanks for the suggestion. Please add it to the list on the suggestion site so others can vote on it as well: suggestions.iamtimcorey.com/
@ElCidPhysics90
@ElCidPhysics90 3 года назад
One thing I’ve don’t understand about sending emails with c# is why I need an email server to send from? For instance, if I have a website I can have a form that sends an email with mailto: Why can’t I do something like that with asp.net?
@argeelearner3978
@argeelearner3978 3 года назад
Thank you
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
We appreciate your support!
@matheusgeorgo
@matheusgeorgo 3 года назад
Hello Tim, that's a great video. I would like to sugest the topic of Nswag, and how to generate and utilize the client generated from swagger. Thank you.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Thanks for the suggestion. I added it to Tim's list.
@rameshshinde9635
@rameshshinde9635 2 года назад
Hi Tim, Thanks for the video. How we can capture Bounced Email (Non-Delivery Report) in C#?
@IAmTimCorey
@IAmTimCorey 2 года назад
You would need to read the email in the inbox unless you use a service that does it for you.
@christopherbaldwin1194
@christopherbaldwin1194 3 года назад
Hey Tim hobbyist coder, how do I get the properties to how up like hints in the code like you do? So SmtpClient(host: "localhost" the host: hint is what I'm trying to activate as I like this for developing especially if it's been a few month since looking at the project
@joshuafinch6111
@joshuafinch6111 3 года назад
I was wondering the same thing. Thanks
@StudentCompanion
@StudentCompanion 3 года назад
Is there a disadvantage by using the .Net smtp class to send email directly compared to fluent email? Thanks a gain for the great video.
@Osbornesupremacy
@Osbornesupremacy 3 года назад
MS recommends not using SmtpClient because it "doesn't support many modern protocols" (that's in their docs). It also doesn't have a proper SendAsync method.
@StudentCompanion
@StudentCompanion 3 года назад
@@Osbornesupremacy ok. Thanks wasn't aware of that!
@IAmTimCorey
@IAmTimCorey 3 года назад
Yep, Microsoft is deprecating it and recommends against using it.
@satori8626
@satori8626 2 года назад
Can FluentEmail also be used to read the emails that you receive from others, or would you use something different for that purpose?
@rjean99
@rjean99 3 года назад
Great video. Question: SmtpClient is marked as obsolete and MS recommends against it's use, however, it is being shown here. Does the sender have to be SmtpClient? confused....
@rjean99
@rjean99 3 года назад
Actually, just checked the latest guide and you can configure other senders, including MailKit: lukelowrey.com/dotnet-email-guide-2021/ I'm guessing you showed System.Net.Mail as a matter of convenience - this is just an FYI for those looking at using FluentEmail that you CAN configure other senders
@igalsavis6491
@igalsavis6491 2 года назад
very nice ... 10x
@IAmTimCorey
@IAmTimCorey 2 года назад
Thank you!
@pradnyakasar614
@pradnyakasar614 2 года назад
hello sir i am not able to create new project in vs code
@IAmTimCorey
@IAmTimCorey 2 года назад
VSCode does not have a "new project" button. Instead, you need to use the command line. This video will help you build C# projects in VSCode: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-r5dtl9Uq9V0.html and this one will help even more with the .NET Command Line: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-RQLzp2Z8-BE.html
@email195
@email195 3 года назад
Another great video Tim. I have been using Exchange WebServices to send emails which allows the email to be placed in sent items after sending which I haven't figured out how to do using SMTP. I really like the Razor Template that you used in this example. Looks like FluentEmail uses RazorLight. I really like the PAPERCUT SMTP tool as well.
@IAmTimCorey
@IAmTimCorey 3 года назад
I'm glad you enjoyed it.
@saaimurugan11
@saaimurugan11 2 года назад
Hi Tim, Fantastic video, I have a question, how do I make the CC optional?
@IAmTimCorey
@IAmTimCorey 2 года назад
Click the CC icon on the video.
@yingxing4134
@yingxing4134 2 года назад
Great video Tim, thank you so much! One question, is it possible to use template with subject?
@IAmTimCorey
@IAmTimCorey 2 года назад
Not sure what type of template you mean. If you are asking if you can use string interpolation or something similar for subject lines, then yes. If you are asking about a template on the email side of things, then no.
@yingxing4134
@yingxing4134 2 года назад
@@IAmTimCorey Happy holidays Tim! Yes that's what I mean. An example in my application is to include the ID within the email subject, and maybe other information, it would be handy to have a template for the subject as well.
@alexei6557
@alexei6557 Год назад
anybody has received a ExtendedSocketException server explicitly refused connection?
@diegoronkkomaki6858
@diegoronkkomaki6858 3 года назад
Does this library have helpers for creating ics-files / email calendar invitations? I've had experiences where I had to create a C# application that sends email calendar invitations and working with ics/vcalendar properties manually was kind of a nightmare.
@master1986a
@master1986a 2 года назад
Nice vid!, Is there a way to make it work with net core 6? I get a PlatformNotSupported exception. Thanks.
@IAmTimCorey
@IAmTimCorey 2 года назад
It should work. Can you try upgrading the package?
@master1986a
@master1986a 2 года назад
@@IAmTimCorey I forgot to mention i'm user Blazor WebAssembly, i got a warning on code that says "SmtpClient" not supported on 'browser'. Maybe it's because i souldt move it to Server? Sorry for my english.
@IAmTimCorey
@IAmTimCorey 2 года назад
Ah, that’s the issue. Blazor WebAssembly runs fully on the client, so it cannot do secure actions like sending emails directly.
@fleedum
@fleedum 3 года назад
Cannot get it to work for SMTP or MailKit ...
@IAmTimCorey
@IAmTimCorey 3 года назад
It sounds like you have a configuration issue somewhere.
@fleedum
@fleedum 3 года назад
@@IAmTimCorey I encounterd some invalid IO exceptions (readonly, invalid operation, ...), I tried the DI way as well. Afterwards, I tried with the same configuration but just with the MailKit package (no Fluent) and that does work. I gave FluentEmail another chance by following the examples on the Github repository and then another chance while following the auhor's blog but no luck. Also the Razor templating did not work for me so I left it commented out. Thank you for taking the time to respond, I did not expect that :)! I've watched many of your video's by now and find them very insightful. And for my project I'll just continue rocking the MailKit package. I'm sending mails containing a reference ID in the body and then retrieving them filtered by that ID over an IMAP client.
@xw9279
@xw9279 3 года назад
Hi Tim, thank you for your video. A quick question: Do companies use FluentEmail in the industry project as the default choice when they want to create some server Apps to send the data reports regularly?
@IAmTimCorey
@IAmTimCorey 3 года назад
It all depends on the company and the situation. Remember that in programming, we have options. We need to make the best choice between the options in every situation rather than prescribing one solution as the "best" option for all situations.
@vigneshbaraman8963
@vigneshbaraman8963 3 года назад
put another video for fluent email with mvc
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Thanks for the recommendation. I have added it to Tim's list of viewer suggestions for videos.
@S3Kglitches
@S3Kglitches 3 года назад
Is there any good package that you would recommend for Outlook interaction from C# program? I mean, sending emails from Outlook account Sort of injecting into Outlook Why is it not possible to use Fluent Email in WebAssembly? Thank you for explaining multiple times that this is the client
@turn1210
@turn1210 3 года назад
You can use the ms outlook 365 exchange directly to send emails, that’s what I’ve done in the past. It avoids having to use a local copy of outlook.
@andywalter7426
@andywalter7426 3 года назад
I can say for sure that if you wanted to do from web assembly, then web assembly would have to send to an api who can do the email. Because with web assembly, everything runs on the client. Browsers don't let you send emails though. If a person had a blazor app that needed to send emails, the best is to have an interface service. The blazor server side can do this way. In web assembly, you send to a web api and the web api can do it. The page would not care how its done.
@jessecavada3015
@jessecavada3015 3 года назад
EWS aka Exchange Web Services. Add package “Exchange.WebServies.Managed.Api” into your .net project.
@S3Kglitches
@S3Kglitches 3 года назад
@@andywalter7426 Ah thanks for pointing out the secrets of web assembly in short, I'm very new to it
@S3Kglitches
@S3Kglitches 3 года назад
@@jessecavada3015 This package for what exactly? Thank you!
@konstantinoskinnas789
@konstantinoskinnas789 3 года назад
Thanks that was exactly what I was waiting for! Also could you do a video on a c sharp CMS equivelant to wordpress?
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Thanks for the suggestion, I added it to Tim's suggestion list.
@konstantinoskinnas789
@konstantinoskinnas789 3 года назад
@@tomthelestaff-iamtimcorey7597 Thanks Tom!
@Gauravkumar-jm4ve
@Gauravkumar-jm4ve 3 года назад
Tx👍
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Thank you for watching.
@themanager5487
@themanager5487 3 года назад
So the next video is sending what's app msg through c#
@IAmTimCorey
@IAmTimCorey 3 года назад
Probably not but we could check into it.
@themanager5487
@themanager5487 3 года назад
@@IAmTimCorey Yes i will search for that.
@FreneticGamer
@FreneticGamer 3 года назад
Hi, thanks for content, awesome video, About line 34 in 30:07, what name plugin/extension show parameters name, e.g ".To('email Address':...., 'name': ...)"
@IAmTimCorey
@IAmTimCorey 3 года назад
Here is how you do that: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-f0YeVirKPfw.html
@FreneticGamer
@FreneticGamer 3 года назад
@@IAmTimCorey Thanks ;)
@cupelappsteam657
@cupelappsteam657 2 года назад
Hi Tim, Thank you for the video. But I am curious that a windows server and a domain name are enough for this to work ( say amazon EC2 windows server?)
@IAmTimCorey
@IAmTimCorey 2 года назад
You have to have a mail server to send email.
@cupelappsteam657
@cupelappsteam657 2 года назад
@@IAmTimCorey Thank you, You mean Can I use Gmail as mail server?
@datcolsol
@datcolsol 3 года назад
When I want to use a production SMTP server how do I specify the user credentials?
@IAmTimCorey
@IAmTimCorey 3 года назад
Here you go: stackoverflow.com/a/56075014/733798
@tejaskanojia7544
@tejaskanojia7544 3 года назад
how to do it with Web API
@IAmTimCorey
@IAmTimCorey 3 года назад
The same way.
@venkatramana331
@venkatramana331 3 года назад
Is this wrote in c# 9?
@IAmTimCorey
@IAmTimCorey 3 года назад
I believe I used a technique or two from C# 9. The versions of C# aren't as big a deal (getting the latest one) because using an older version won't hurt anything. It is only when your application does not support the latest version that it is a problem.
@pujithreddy308
@pujithreddy308 3 года назад
I'm not able parse datetimein the format of "yyyy-MM-dd" any inputs on this
@Jay-Dee
@Jay-Dee 3 года назад
docs.microsoft.com/en-us/dotnet/standard/base-types/parsing-datetime
@IAmTimCorey
@IAmTimCorey 3 года назад
Time to debug why.
@bigdummyhead2162
@bigdummyhead2162 3 года назад
Do you and or can you make a video on P2P (TcpClient/TcpListeners) on the System.Net.Sockets namespace in C#?
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Thanks for the recommendation. I have added it to Tim's list of viewer suggestions for videos.
@bigdummyhead2162
@bigdummyhead2162 3 года назад
@@tomthelestaff-iamtimcorey7597 Thank ya
@zedmagdy
@zedmagdy 3 года назад
dont we need a Message Queue for sending emails?
@IAmTimCorey
@IAmTimCorey 3 года назад
Nope, those are for Service Bus and other queue systems ( ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-v52yC9kq0Yg.html ), not for SMTP.
@zedmagdy
@zedmagdy 3 года назад
@@IAmTimCorey but what if ur app got 100k registers and u have to send verification emails that may fails isnt it a better approach to use queue with retries?
@myaloy
@myaloy 3 года назад
Quick question - what theme are you using for VS? Also, can a .Net 5 email compone be consumed by Framework (4.6 and above ) apps ? Thanks
@IAmTimCorey
@IAmTimCorey 3 года назад
I'm using the built-in dark theme. As for consuming a .NET 5 project in .NET Framework, no, you can't do that but you can make the .NET 5 library a .NET Standard 2.0 instead and then it will work (both with .NET 5 and .NET Framework 4.6.1 and above).
@myaloy
@myaloy 3 года назад
@@IAmTimCorey Wow, such a quick reply - Thanks
@MGD320
@MGD320 3 года назад
how about receiving emails!?
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
I have added the suggestion to Tim's list of viewer suggestions / requests.
@Tommy-wp2nq
@Tommy-wp2nq Год назад
how to send email to all users
@IAmTimCorey
@IAmTimCorey Год назад
Not sure what you mean by "all users", but you can add as many addresses to the "To", "CC", or "BCC" fields as you want.
@Tommy-wp2nq
@Tommy-wp2nq Год назад
​@@IAmTimCorey I want to send a message to a number of subscribers on my site at the same time
@IAmTimCorey
@IAmTimCorey Год назад
You can use this to do that, although once you get to a certain size, email providers don't like you sending out mass emails like that from your personal account. That's when you would use a service like SendGrid to send out the email. You can still trigger that from C#.
@benjamininkorea7016
@benjamininkorea7016 3 года назад
You forgot "How not to get e-mails from your site blocked by google!" hehe
@IAmTimCorey
@IAmTimCorey 3 года назад
Yeah, that's a tough one. In my case, especially tough since I'm emailing code. :-)
@treehole443
@treehole443 3 года назад
i don't even really have to pay for this?
@IAmTimCorey
@IAmTimCorey 3 года назад
Nope. Not unless you use a paid email provider.
@Mr_NoobPlay
@Mr_NoobPlay Год назад
I love your videos but these fake comments are annoying
@IAmTimCorey
@IAmTimCorey Год назад
What fake comments?
@IAmTimCorey
@IAmTimCorey Год назад
Wait, is this a bot trying to pretend they aren't a bot by complaining about fake comments?
@Mr_NoobPlay
@Mr_NoobPlay Год назад
@@IAmTimCorey 😒😒
@RalfsBalodis
@RalfsBalodis 3 года назад
lol
@selimtv3428
@selimtv3428 3 года назад
You talk a lot for a simple tutorial.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Tim just has lots of good things to say!
@snehijob
@snehijob 2 года назад
time wasted
@IAmTimCorey
@IAmTimCorey 2 года назад
Bummer. Didn’t actually want to send an email or were you expecting a different way to send emails?
@rightobjectaccount9765
@rightobjectaccount9765 2 года назад
Hi Tim, Nice tutorial- very helpful. I have a question- how do I add a logo to an email body using the Fluent email framework? Does Fluent support add any logo at all? Love your tutorials. Thanks
@IAmTimCorey
@IAmTimCorey 2 года назад
Yes, but that isn't a Fluent email-specific thing. You can check their documentation, though.
@rightobjectaccount9765
@rightobjectaccount9765 2 года назад
Thanks for your reply. By doing an attachment, I can show an inline image onto the email body. But not sure if that’d be the right way to do it. I wish I could find any document about the binding inline image using the FluentEmail package. Look forward to seeing more tutorials from you.
@soumikmahajan6317
@soumikmahajan6317 3 года назад
Any thoughts on SendGrid?
@IAmTimCorey
@IAmTimCorey 3 года назад
I use it and like it.
@leonroutzounis383
@leonroutzounis383 2 года назад
Thanks Tim for the tutorial. However I get an error message as follows. "No connection could be made because the target machine actively refused it." How can I fix that??
@IAmTimCorey
@IAmTimCorey 2 года назад
Sounds like there is an issue with the firewall.
@devlife013
@devlife013 3 года назад
Thanks for the video Tim. I just want to share my experience, I created a Class Library (.Net Core) and named it as EmailSender. after creating the project I installed FluentEmaill.Smtp, when I tried to use SmtpSender() the namespace FluentEmail.Smtp did not include into the class "Cannot resolve symbol FluentEmail" , however I added it manually but got that issue again. I found out my project name "EmailSender" has some conflict and after changing my project name the problem gone.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 года назад
Thank you for sharing the experience. I'm sure you will save others from struggling with similar issues, saving both time and frustration.
@davidjnevin
@davidjnevin 2 года назад
Excellent as always! Really learning lots with every video. Thanks so much. Would love to see a video on a sendgrid api integration, not just sending mails but adding contacts, working with segments etc.
@chrismingay6005
@chrismingay6005 3 года назад
Normally a real fan of your videos, but I think you were a bit thin on some details here. Please can you go into more detail about the bacon-wrapped bacon, thank you.
@rjean99
@rjean99 3 года назад
:)
@NzuzoKunene-cj7sx
@NzuzoKunene-cj7sx 23 дня назад
can you do this lesson using a c sharp windows form application
@IAmTimCorey
@IAmTimCorey 22 дня назад
The code would be basically the same. The only difference is that you would activate it and display the results on a form instead of the console window. Is there something specific that you are stuck on? Have you tried it yourself?
@fieryscorpion
@fieryscorpion 3 года назад
Hi Tim, Can you please create a video tutorial on how to receive and consume messages using Mass Transit? Thank you!
@IAmTimCorey
@IAmTimCorey 3 года назад
I’ll add it to the suggestion list.
@nimecloud
@nimecloud 2 года назад
In Blazor app what will be the sender IP address? Wasm vs Server versions.
@IAmTimCorey
@IAmTimCorey 2 года назад
You cannot send email from Blazor WebAssembly, since client-side cannot do secure operations (all of the source code is sent to the client in clear text). For Blazor Server, it would be the server's IP address.
@jovi811209
@jovi811209 2 года назад
Thanks for the vedio Tim, really great vedio. There is a question, what's your recommendation to send large amount of mails at a time using FluentEmail (e.g. 10,000)? If FluentEmail is not supported, is there any suggestion ?
Далее
Intro to MediatR - Implementing CQRS and Mediator Patterns
1:21:50
10 C# Libraries To Save You Time And Energy
33:59
Просмотров 207 тыс.
Stop Using FirstOrDefault in .NET! | Code Cop #021
12:54
Brutally honest advice for new .NET Web Developers
7:19
Being Competent With Coding Is More Fun
11:13
Просмотров 78 тыс.
Don't Use Polly in .NET Directly. Use this instead!
14:58
The Logging Everyone Should Be Using in .NET
15:34
Просмотров 70 тыс.
Dependency Injection in .NET Core (.NET 6)
1:00:32
Просмотров 190 тыс.