Тёмный

how to send email in asp.net mvc | MVC sending email 

Haritha Computers & Technology
Подписаться 44 тыс.
Просмотров 35 тыс.
50% 1

#mvcemail #gmailmvc #sendmailmvc
How To Send SMTP Mail Setup Host & Port (MVC, asp.net) | GMAIL
To send emails using ASP.NET Core MVC in Visual Studio 2019, configure Gmail SMTP settings in the appsettings.json file. Then, in the controller, use the SmtpClient class to send emails via Gmail's SMTP server, providing sender, recipient, subject, and message details. Ensure proper error handling and secure practices, such as using app secrets or environment variables for sensitive data. Use async/await for non-blocking operations. Finally, test and verify email functionality for successful implementation.
mvc send email to gmail account how to setup
To set up sending emails to a Gmail account using the MVC (Model-View-Controller) pattern, integrate an email service library like SMTP. In the Controller, handle the email logic by configuring SMTP settings, specifying recipient, subject, and message. In the Model, manage data and email content, while the View provides the interface. Authenticate with Gmail's SMTP server using your account credentials. Ensure security measures like app-specific passwords or OAuth2.0. Implement error handling for smooth operation. Test thoroughly before deployment.
Checkout the complete video tutorial, code snippet for sending an email using Gmail SMTP in ASP.NET Core MVC c#

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

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 33   
@nonelelacele9300
@nonelelacele9300 2 года назад
It did not work for me. I got this error "The SMTP server requires a secure connection or the client was not authenticated"
@prajakta3884
@prajakta3884 Месяц назад
Same
@dashmeetsethi4240
@dashmeetsethi4240 2 года назад
Could you please create a video on sending mail using API controller and angular js. Please help.
@cafedecausette2182
@cafedecausette2182 2 года назад
Hi I am new to this but if I want to use your gmail controller routine as a common routine which if I have different view from different controller which need to automatically send email notification once a transaction is done? thanks!
@didarsingh8321
@didarsingh8321 4 года назад
sir my code isn't working when i click on send button nothing happens not even it shows any error sir plz provide any solution ASAP i have to submit this code by tomorrow plz help me
@vishalverma2965
@vishalverma2965 Год назад
bhai tera accent bhut irritating aur kharab hai ... hindi bol le acha smj aaega sab ko
@kooshasamadi9107
@kooshasamadi9107 4 года назад
Thanks for recording as a record you should have change usedefaultcredentials to false becuz u r setting up new credentials by networkcredential
@sarujanrajaratnam7097
@sarujanrajaratnam7097 4 года назад
Its Work thank you
@HarithaComputersTechnology
@HarithaComputersTechnology 4 года назад
You're welcome!
@husnaafrin.creation
@husnaafrin.creation 5 лет назад
Can you give your source code file plz?
@angiehenriques-fernandes5690
@angiehenriques-fernandes5690 4 года назад
Thank you. Your tutorials are helpful as always :)
@genebel-mf5lt
@genebel-mf5lt Год назад
Thank you very much for this video
@HarithaComputersTechnology
@HarithaComputersTechnology Год назад
You are welcome
@_Neha_M_
@_Neha_M_ 4 года назад
Error says that:the server response was 5.7.0 authentication required and also that the smtp connection must be established or the client was not authenticated.plz help me ASAP
@HarithaComputersTechnology
@HarithaComputersTechnology 4 года назад
For your problem i have already made a tutorial.. please check in my playlist... thanks neha
@lakshman9682
@lakshman9682 3 года назад
@@HarithaComputersTechnology Pls share link
@swapnilgharde4882
@swapnilgharde4882 5 лет назад
send me mailing cod
@lueljohndiaz1557
@lueljohndiaz1557 5 лет назад
Thank you for this, but I have an error says "The remote certificate is invalid according to the validation procedure."
@HarithaComputersTechnology
@HarithaComputersTechnology 5 лет назад
i think some anti virus software is blocking... please check
@ivke6989
@ivke6989 6 лет назад
Works flawlessly man, thanks. I love videos like this where you go straight to the point, i followed this tut with ease and got it to work. If someone have problems and have typed the exact same code as shown in this video, you need to go to the sending email, and enable "LESS SECURE APPS " option.
@clementmgs424
@clementmgs424 4 года назад
T'es content de recevoir tes propres mail ? car vers la fin de la vidéo, il saisit une adresse puis exécute le formulaire et quand il vérifie l'expéditeur dans sa boite mail, c'est pas la bonne adresse. L'expéditeur est charan3k au lieu de earnrupee.in@gmail.com
@123Yuda321
@123Yuda321 6 лет назад
Hi, I did exactly what you did and it doesn't work. It says : "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond" any solution?
@HarithaComputersTechnology
@HarithaComputersTechnology 6 лет назад
the code perfectly works... i think you need to change the ip address please google about that problem..
@123Yuda321
@123Yuda321 6 лет назад
Haritha Computers & Technology thanks for the fast comment :) I have looked in google for 2 days- Still doesnt work :\ I have no idea what to do! My code is a "copy-paste" of yours. Are you trying to send from localhost in the video?
@andiswalucia9633
@andiswalucia9633 6 лет назад
I have exactly the same problem
@manjarinelli8597
@manjarinelli8597 6 лет назад
Thank you for your code . It works perfectly
@HarithaComputersTechnology
@HarithaComputersTechnology 6 лет назад
Thanks !
@khaled7370
@khaled7370 5 лет назад
thank u a lot bro
@HarithaComputersTechnology
@HarithaComputersTechnology 5 лет назад
Thanks mate !