Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace sirhcApplication.Common
- {
- public static class EmailUtility
- {
- public static bool SendPasswordEmail(string email, string password)
- {
- try
- {
- System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage(email, "Sirhc.sirhcmail.com");
- mail.Subject = "Your sirhc Password";
- mail.Body = "Your Sirhc account password is " + password;
- System.Net.Mail.SmtpClient clnt = new System.Net.Mail.SmtpClient();
- clnt.Send(mail);
- }
- catch (System.Net.Mail.SmtpException)
- {
- return false;
- }
- return false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement