Beispiel #1
0
        private string InviteEmailReply(IStepInput input)
        {
            if (Data["invite_unique_id"] != null)
            {
                var invite  = InviteInput.FromDict(this.Data);
                var contact = Contact.FromDict(this.Data);

                Bus.Send(new CreateEmailMessage()
                {
                    Id           = Guid.NewGuid().ToString(),
                    Address      = contact.Email,
                    Sender       = "*****@*****.**",
                    Subject      = "Thanks for your Reply",
                    BodyTemplate = invite.ResponseEmailTemplate
                });

                Bus.Send(GetApiCall("email", "yes"));

                if (invite.ResponseEmailTemplate != null && !string.IsNullOrEmpty(invite.ResponseEmailTemplate.RedirectUrl))
                {
                    var templateManager = new MemoryTemplateManager();
                    return(templateManager.Fill(invite.ResponseEmailTemplate.RedirectUrl, this.Data));
                }
                else
                {
                    return("<Response>Thank you for your response</Response>");
                }
            }
            else
            {
                return("<Response>You havent been invited</Response>");
            }
        }
Beispiel #2
0
        private void CancelAttendeeEmail(InviteInput invite, Contact contact)
        {
            if (string.IsNullOrEmpty(contact.Email))
            {
                return;
            }

            var templateManager = new MemoryTemplateManager();
            var bodyData        = GetTemplateContextData(invite, contact);

            Bus.Send(new CreateEmailMessage()
            {
                Id           = Guid.NewGuid().ToString(),
                Address      = contact.Email,
                Sender       = "*****@*****.**",
                Subject      = templateManager.Fill(invite.CancelEmailTemplate.Subject, bodyData),
                BodyTemplate = invite.CancelEmailTemplate,
                BodyData     = bodyData,
            });
        }