コード例 #1
0
        public ActionResult SendEmail(string[] SelectedEmail, FormCollection frm)
        {
            Utilities.Email.Emailer obj = new Utilities.Email.Emailer();
            if (SelectedEmail.Count() > 0)
            {
                string emailRecipent = String.Join(",", SelectedEmail);
                string emailBody = PrepareBody();
                obj.Send(emailRecipent, "Selected Offers", emailBody, string.Empty);

                //Update Email Send flag in db

                var selOffer = offerSesssionRepository.GetAll().FirstOrDefault(x => x.IsSelected == true);
                if (selOffer != null)
                {

                    var apiMethod = string.Format("creditreport/offers/UpdateOfferEmailFlag/{0}/{1}?isEmailSent={2}&offerId={3}", CurrentMerchantID, ContractID, true, selOffer.offerId);
                    var resp = BaseApiData.PostAPIData<object>(apiMethod, "");
                }

            }
            return RedirectToAction("Index");
        }
コード例 #2
0
ファイル: OfferController.cs プロジェクト: rayanc/Pecuniaus
 public ActionResult SendEmail(string[] SelectedEmail)
 {
     Utilities.Email.Emailer obj = new Utilities.Email.Emailer();
     if (SelectedEmail.Count() > 0)
     {
         string emailRecipent = String.Join(",", SelectedEmail);
         string emailBody = PrepareBody();
         obj.Send(emailRecipent, "Testmails", emailBody, string.Empty);
     }
     return RedirectToAction("Index");
 }
コード例 #3
0
        public ActionResult SendEmail(string[] SelectedEmail)
        {
            Utilities.Email.Emailer obj = new Utilities.Email.Emailer();
            if (SelectedEmail.Count() > 0)
            {
                string emailRecipent = String.Join(",", SelectedEmail);
                string emailBody = PrepareBody();
                obj.Send(emailRecipent, "Testmails", emailBody, string.Empty);

                var apiMethod = string.Format("creditreport/offers/UpdateOfferCreationEmailFlag/{0}/{1}?isEmailSent={2}", CurrentMerchantID, ContractID, true);
                var resp = BaseApiData.PostAPIData<object>(apiMethod, "");
            }
            return RedirectToAction("Index");
        }