Last post Jun 19, 2019 02:31 AM by Yuki Tao
Jun 18, 2019 02:53 PM|slimbunny|LINK
I need to send mail using MVC, can someone give me some help with setting up a send mail in my codes, please. Start with basic ... thanks
Jun 18, 2019 03:01 PM|PatriceSc|LINK
See for example https://docs.microsoft.com/en-us/dotnet/api/system.web.mail.smtpmail?view=netframework-4.8 (ie define From, To, Subject & Body).
You can use https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/network/smtp-element-network-settings#example to
configure mail settings which are automatically used by the SmtpClient class.
More likely it won't work the first time and we would need the EXACT error message (ie exception.ToString()) so that we can tell you which problem you have.
Jun 19, 2019 02:31 AM|Yuki Tao|LINK
I need to send mail using MVC, can someone give me some help with setting up a send mail in my codes, please. Start with basic
You could refer to
this article,about send email by MailMessage and SmtpClient,it covered the basics of sending email from and ASP.NET MVC site and the most common error messages encountered when sending email programmatically.
Also,you could refer to
this article about send email by WebMail,The WebMail helper makes it easy for you to send email.
They all need to via SMTP or via any number of free services such as Google's Gmail system, Microsoft's Outlook.com/Live service,.
It can be a challenge sometimes to make sure you have the right settings for the SMTP server, port number, and so on. Here are a few tips: