예제 #1
0
 public int CreateTriggeredSendDefinitionWithEmailTemplate(string externalKey, string layoutHtmlAboveBodyTag, string layoutHtmlBelowBodyTag)
 {
     return(CreateWithTemplate(externalKey,
                               layoutHtmlAboveBodyTag +
                               "<body>" +
                               EmailContentHelper.GetContentAreaTag("dynamicArea") +
                               EmailContentHelper.GetOpenTrackingTag() +
                               EmailContentHelper.GetCompanyPhysicalMailingAddressTags() +
                               "</body>" +
                               layoutHtmlBelowBodyTag));
 }
예제 #2
0
 public int Create(string externalKey)
 {
     return(CreateWithTemplate(externalKey,
                               "<html>" +
                               "<body>" +
                               EmailContentHelper.GetContentAreaTag("dynamicArea") +
                               EmailContentHelper.GetOpenTrackingTag() +
                               EmailContentHelper.GetCompanyPhysicalMailingAddressTags() +
                               "</body>" +
                               "</html>"));
 }
예제 #3
0
        /// <summary>
        /// <para>Creates a Triggered Send Definition with an email template containing a content area. (and %%Subject%% replacement value)</para>
        /// <para>You can specify html layouts for above and below the body tags.</para>
        /// </summary>
        /// <param name="externalKey"></param>
        /// <param name="layoutHtmlAboveBodyTag"></param>
        /// <param name="layoutHtmlBelowBodyTag"></param>
        /// <param name="priority"></param>
        /// <returns></returns>
        public int CreateTriggeredSendDefinitionWithEmailTemplate(string externalKey, string layoutHtmlAboveBodyTag, string layoutHtmlBelowBodyTag, Priority priority = Priority.Medium)
        {
            var layoutHtml = layoutHtmlAboveBodyTag +
                             "<body>" +
                             EmailContentHelper.GetContentAreaTag("dynamicArea") +
                             "</body>" +
                             layoutHtmlBelowBodyTag;

            using (var creator = new TemplatedEmailCreator(_config))
            {
                return(creator.Create(externalKey, layoutHtml, priority));
            }
        }
예제 #4
0
        /// <summary>
        /// <para>Creates a Triggered Send Definition with an email template containing a content area and replacement value %Subject%.</para>
        /// <para>Use this if you want to edit the email markup in the ET UI.  </para>
        /// </summary>
        /// <param name="externalKey"></param>
        /// <param name="priority"></param>
        /// <returns></returns>
        public int Create(string externalKey, Priority priority = Priority.Medium)
        {
            var layoutHtml = "<html>" +
                             "<body>" +
                             EmailContentHelper.GetContentAreaTag("dynamicArea") +
                             EmailContentHelper.GetOpenTrackingTag() +
                             EmailContentHelper.GetCompanyPhysicalMailingAddressTags() +
                             "</body>" +
                             "</html>";

            using (var creator = new TemplatedEmailCreator(_config))
            {
                return(creator.Create(externalKey, layoutHtml, priority));
            }
        }