Пример #1
0
        public void TenantReferral(BGBC.Model.TenantReferral tenantRef)
        {
            this._toAddress = System.Configuration.ConfigurationManager.AppSettings.Get("AdminMailID").ToString();
            System.Text.StringBuilder _body = new System.Text.StringBuilder("<html><head><style>p { font-size: 12px; font-family: Arial;}</style></head><body>");
            _body.Append("<p>Hi BGBC Admin,</p>");
            _body.Append("<p>Tenant referral sent with following details.</p>");
            _body.Append("<p>Name: " + tenantRef.Name + "</p>");
            _body.Append("<p>Email: " + tenantRef.Email + "</p>");
            _body.Append("<p>Phone: " + tenantRef.Phone + "</p>");
            _body.Append("<p>Contact Name For Landlord/Property Management Company: " + tenantRef.LandlordName + "</p>");
            _body.Append("<p>Phone For Landlord/Property Management Company: " + tenantRef.LandlordPhone + "</p>");
            _body.Append("<p>Email For Landlord/Property Management Company: " + tenantRef.LandlordEmail + "</p>");
            _body.Append("<p>Mailing Address For Landlord/Property Management Company: " + tenantRef.LandlordAddress + "</p>");
            _body.Append("<br/><p>Thank you,<br/>BGBC Customer Service.</p>");
            _body.Append("</body></html>");

            try
            {
                IRepository <Email, int?> mailRepo = new EmailRepository();
                mailRepo.Add(new Email {
                    ToAddress = this._toAddress, Subject = "Tenant Referral", Body = _body.ToString()
                });
            }
            catch (Exception ex)
            {
                log.Error(ex.Message);
            }
        }
Пример #2
0
        public async Task <IActionResult> CreateEmail(int contactId, DetailInfoForUpdateDto details)
        {
            Email email = new Email();

            email.EmailAddress = details.emailAddress;
            email.ContactId    = contactId;
            _repo.Add(email);
            await _repo.SaveAll();

            return(Ok());
        }
Пример #3
0
 public void TenantAdd(string ToAddress, string Name, string ResetUrl)
 {
     this._toAddress = ToAddress;
     this._subject   = "Tenant User Created";
     _body           = "<html><head><title></title></head><style>td { font-size: 12px; font-family: Arial;}</style><body><table><tr><td><span>Hi " + Name + ",</span><br/><br/></td></tr><tr><td>New login has been created by your property owner. Please visit this link to enter your new password.</td></tr><tr><td></td></tr><tr><td><a href='" + ResetUrl + "'>"
                       + ResetUrl + "</a><br/><br/><br/></td></tr></br><tr><td>Thank you,</td></tr><tr><td>BGBC Customer Service.</td></tr></table></body></html>";
     try
     {
         IRepository <Email, int?> mailRepo = new EmailRepository();
         mailRepo.Add(new Email {
             ToAddress = ToAddress, Subject = _subject, Body = _body
         });
     }
     catch (Exception ex)
     {
         log.Error(ex.Message);
     }
 }
        public virtual string CreateOrderConfirmationEmail(OrderConfirmationEmailRequest request)
        {
            var email = new Email
            {
                HTMLBody      = FillEmailVariables(request),
                DateCreated   = DateTime.Now,
                Subject       = request.EmailSubject,
                FromAddress   = request.SenderEmail,
                ToAddresses   = request.ReceiverEmail,
                BCCAddresses  = request.CcEmails,
                PriorityLevel = 3,
                ReadyToSend   = true,
                OrderId       = request.OrderId
            };

            EmailRepository.Add(email);

            return(string.Empty);
        }