Hi everyone. I have a few question to ask regarding email notification in c#.
I have the following codes:
SmtpClient smtpClient = new SmtpClient();
MailMessage message = new MailMessage();
message.To.Add("alex@hotmail.com");
message.To.Add("alex2@gmail.com");
message.Subject = "Test";
message.IsBodyHtml = true;
message.Body = "<html><b>Hello World!</b></html>";
smtpClient.Send(message);
While in my web.config I do have such codes.
<system.net>
<mailSettings>
<smtp deliveryMethod="Network" from="testing@gmail.com">
<network host="smtp.gmail.com" port="587" enableSsl ="true" defaultCredentials ="false" password ="123" userName ="testing@gmail.com"></network>
</smtp>
</mailSettings>
</system.net>
But still I cant get any email in my inbox. Is there anything else to configure or I
miss it out?
Thanks in advance!