using GrossreeApi.BajajLiveService; using GrossreeApi.DBManager; using GrossreeApi.Models; using GrossreeApi.Proposals; using Newtonsoft.Json; using RestSharp; using SendGrid; using SendGrid.Helpers.Mail; using System; using System.Collections.Generic; using System.Data; using System.IO; using System.Linq; using System.Net; using System.Net.Mail; using System.Net.Mime; using System.Text; using System.Web; namespace GrossreeApi.Common { public class EmailService { string _BccEmail = "developer.durgesh@gmail.com"; string _AdminEmail = "developer.durgesh@gmail.com";//"cst@policybonanza.com"; string _ViewQuoteMail = "developer.durgesh@gmail.com"; string _FromEmail = "developer.durgesh@gmail.com";// "prstargroup@stargroupindia.biz" after purchase ... from info@policybonanaza.com; string _Userid = "stariglobaltech@gmail.com";// "prstargroup@stargroupindia.biz"; string _Password = "Star@12345";//"Star@123"; int _Port = 25; string _Host = "smtp.gmail.com"; bool _UseDefaultCredential = true; bool _EnableSsl = true; bool isBodyHtml = true; public string shareResult(ShareModel model) { string Response = ""; string body = ""; try { string Clientname = HostName(model.ClientURL); Clientname = DBManager.DBHelper.ExecuteSQLSingleValue("select companyName from ClientMaster where companyURL like '%" + Clientname + "%'"); string motortype = model.TypeOfMoter.ToUpper().Contains("TWO") ? "Two Wheeler Summary And Payment Link" : "Private Car Summary And Payment Link"; motortype = model.UserName == null ? motortype : model.UserName + ": " + motortype; string Productname = model.TypeOfMoter.ToUpper().Contains("TWO") ? "Two Wheeler" : "Private Car"; string imgurl = model.ClientURL.Contains("insta") ? "https://insta-policy.com/Content/PolicyMart/images/InstaPolicy/logo.png" : ""; Int64 a; bool issms; try { a = Convert.ToInt64(model.ToEmail); issms = true; } catch (Exception) { issms = false; } if (!issms) { if (model.Url.Contains("smcinsurance") && ((model.Role != null) && (model.Role != ""))) { body = "
|
|
| Hi, Your proposal information page is ready for review. Please click here to view or modify the details. |
| For any assistance, please call our POS |
| Best Regards,
|
| Legal Disclaimer: The contents of this email message and any attachments are intended solely for the intended recipient to which it is addressed and may contain confidential and/or privileged information and may be legally protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply email and then delete this message and any attachments. If you are not the intended recipient, you are hereby notified that any use, dissemination, copying, or storage of this message or its attachments is strictly prohibited. Unauthorized disclosure and/or use of information contained in this email may result in civil and criminal liability. |
" +
"
| " +
"
| " +
//" | " +
//"
| " +
//" Please click on below button to get " + motortype + " Proposal Summary and to proceed for Payment:" + //" Click ME " + //" | " +
//"
| " + //" | " + //"
| " +
//" | " +
//"
| " +
//" Please click on below button to get " + motortype + " Proposal Summary and to proceed for Payment:" + //" Click ME " + //" | " +
//"
| " + //" | " + //"
| " +
" | " +
"
| " +
" Please click on below button to get " + motortype + " Proposal Summary and to proceed for Payment:" + " Click ME " + " | " +
"
| " + " | " + "
" +
"
| " +
"