Example #1
0
        internal Response SendMail(Request obj)
        {
            Response respObj = new Response();

            try
            {
                MailMessage mMailMessage = new MailMessage();
                mMailMessage.To.Add(new MailAddress(obj.sendTo));

                mMailMessage.From = new MailAddress(obj.sendFrom);

                mMailMessage.Subject = obj.subject;

                StringBuilder desc = new StringBuilder();
                desc.Append("<html><body>");
                desc.Append("<h1>" + obj .message+ "</h1>");

                desc.Append("</body></html>");
                mMailMessage.Body = desc.ToString();
                mMailMessage.IsBodyHtml = true;
                SmtpClient mSmtpClient = new SmtpClient();
                mSmtpClient.Send(mMailMessage);

                respObj.isSuccess = true;

            }
            catch (Exception ex)
            {

                respObj.isSuccess = false;

            }

            return respObj;
        }
Example #2
0
        internal Response SendMailTest(Request obj)
        {
            Response respObj = new Response();

               // respObj = RestServiceUtils.makeRestCall<Request, Response>(obj, "/provider/entity/locationVerfied", "www.google.com");

            return respObj;
        }
Example #3
0
 public Response Any(Request RequestObj)
 {
     MailHelper obj = new MailHelper();
     return obj.SendMail(RequestObj);
 }