All Projects → rocketbase-io → email-template-builder

rocketbase-io / email-template-builder

Licence: MIT License
let this service generate your custom html/text emails

Programming Languages

java
68154 projects - #9 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to email-template-builder

Tppdf
TPPDF is a simple-to-use PDF builder for iOS
Stars: ✭ 444 (+1676%)
Mutual labels:  builder, generator
Hermes
Golang package that generates clean, responsive HTML e-mails for sending transactional mail
Stars: ✭ 2,379 (+9416%)
Mutual labels:  generator, email-template
Vue Email Editor
Drag-n-Drop Email Editor Component for Vue.js
Stars: ✭ 166 (+564%)
Mutual labels:  builder, email-template
lowcode
React Lowcode - prototype, develop and maintain internal apps easier
Stars: ✭ 32 (+28%)
Mutual labels:  builder, generator
Ultimate Page Builder
📦 Ultimate Page Builder for WordPress
Stars: ✭ 39 (+56%)
Mutual labels:  builder, generator
Mosaico
Mosaico - Responsive Email Template Editor
Stars: ✭ 1,392 (+5468%)
Mutual labels:  builder, email-template
React Email Editor
Drag-n-Drop Email Editor Component for React.js
Stars: ✭ 3,131 (+12424%)
Mutual labels:  builder, email-template
mybatis-generator-plus
轻度扩展mybatis-generator-core插件,与官方插件兼容。
Stars: ✭ 62 (+148%)
Mutual labels:  generator
alpine-pypy
Docker-based builds for PyPy on Alpine Linux
Stars: ✭ 31 (+24%)
Mutual labels:  builder
uibuilder.nim
UI prototyping w/ Glade for lazy me
Stars: ✭ 21 (-16%)
Mutual labels:  builder
prestashop-shop-creator
Generate random demo data to test your PrestaShop shop.
Stars: ✭ 22 (-12%)
Mutual labels:  generator
faker
Faker is a Nim package that generates fake data for you.
Stars: ✭ 28 (+12%)
Mutual labels:  generator
maze-generator
A real-time JavaScript maze generator using the depth-first search algorithm
Stars: ✭ 13 (-48%)
Mutual labels:  generator
starter-postmark
A Maizzle starter based on Postmark's transactional email templates.
Stars: ✭ 39 (+56%)
Mutual labels:  email-template
BalloonPopup
Forget Android Toast! BalloonPopup displays a round or squared popup and attaches it to a View, like a callout. Uses the Builder pattern for maximum ease. The popup can automatically hide and can persist when the value is updated.
Stars: ✭ 32 (+28%)
Mutual labels:  builder
ts-lehre
Generate document block(JsDoc, EsDoc, TsDoc) from source code
Stars: ✭ 14 (-44%)
Mutual labels:  generator
avro-schema-generator
Library for generating avro schema files (.avsc) based on DB tables structure
Stars: ✭ 38 (+52%)
Mutual labels:  generator
iteration utilities
Utilities based on Pythons iterators and generators.
Stars: ✭ 65 (+160%)
Mutual labels:  generator
gen
Gen: Friendly & Safer GORM powered by Code Generation
Stars: ✭ 677 (+2608%)
Mutual labels:  generator
badaso
The API & platform builder, build your apps 10x faster even more, it's open source & 100% free !
Stars: ✭ 650 (+2500%)
Mutual labels:  generator

email-template-builder

logo

Build Status Maven Central

Let this service build your html/text emails in a fluent manner. It doesn't try to reinvent the wheel - it simply extends the given email-template of postmark and backed it for java to use it for many purposes.

You can write your email content fluently and the template builder cares for the correct instyling, conversation to txt version etc...

For sending the email I can recommend the spring-boot-starter-mail, simplejavamail or my postmark-spring...

release notes

  • 1.x bases mailgun templates

    • extra dependency on jsoup for auto inlining/transpiling to text
    • doc for old api could be found in wiki
  • 2.x bases on new postmark templates

    • pom artifact group changed to io.rocketbase.mail
    • removed jsoup from dependency and changed api in many cases
    • cleaned up a lot of code
    • separated module in two pices
      • common builder
      • markdown (with markdown support)

features

  • generate html and text mail via one fluent build
  • just pebble-template engine as dependency
  • support for the following content-types
    • Logo in the header
    • Text also with HTML support and Alignment configuration
    • Image with Alignment configuration and Link options
    • Button with custom Styling
    • Footer with HTML support and Alignment configuration
    • Copyright with dynamic Year and Link options
    • table with header, item/price, total
    • key value pairs
    • interface for tables to provide custom layouts
    • extra module to transpile markdown

usage

sample html/text

// generate html/text content
HtmlTextEmail htmlTextEmail = builder
        .header()
        .logo("https://www.rocketbase.io/img/logo-dark.png").logoHeight(41)
        .and()
        .text("Welcome, {{name}}!").h1().center().and()
        .text("Thanks for trying [Product Name]. We’re thrilled to have you on board. To get the most out of [Product Name], do this primary next step:").and()
        .button("Do this Next", "http://localhost").blue().and()
        .text("For reference, here's your login information:").and()
        .attribute()
        .keyValue("Login Page", "{{login_url}}")
        .keyValue("Username", "{{username}}")
        .and()
        .html("If you have any questions, feel free to <a href=\"mailto:{{support_email}}\">email our customer success team</a>. (We're lightning quick at replying.) We also offer <a href=\"{{live_chat_url}}\">live chat</a> during business hours.",
                "If you have any questions, feel free to email our customer success team\n" +
                        "(We're lightning quick at replying.) We also offer live chat during business hours.").and()
        .text("Cheers,\n" +
                "The [Product Name] Team").and()
        .copyright("rocketbase").url("https://www.rocketbase.io").suffix(". All rights reserved.").and()
        .footerText("[Company Name, LLC]\n" +
                "1234 Street Rd.\n" +
                "Suite 1234").and()
        .footerImage("https://cdn.rocketbase.io/assets/loading/no-image.jpg").width(100).linkUrl("https://www.rocketbase.io").and()
        .build();

// sent email
MimeMessage message = emailSender.createMimeMessage();
MimeMessageHelper helper = new MimeMessageHelper(message,
        MimeMessageHelper.MULTIPART_MODE_MIXED_RELATED,
        StandardCharsets.UTF_8.name());
helper.setTo(to);
helper.setSubject(subject);
helper.setText(htmlTextEmail.getText(), htmlTextEmail.getHtml());
helper.setFrom(from);
emailSender.send(message);

preview HTML-Version

sample

preview Text-Version

Welcome, {{name}}!

Thanks for trying [Product Name]. We=E2=80=99re thrilled to have you on boa=
rd. To get the most out of [Product Name], do this primary next step:

Do this Next -> http://localhost

For reference, here's your login information:

Login Page: {{login_url}}
Username: {{username}}


If you have any questions, feel free to email our customer success team
(We're lightning quick at replying.) We also offer live chat during business hours.

Cheers,
The [Product Name] Team

sample table

TbConfiguration config = TbConfiguration.newInstance();
config.getContent().setFull(true);

HtmlTextEmail htmlTextEmail = builder
        .configuration(config)
        .header().text(header).and()
        .text("Hi {{name}},").and()
        .text("Thanks for using [Product Name]. This is an invoice for your recent purchase").and()
        .tableSimple("#.## '€'")
        .headerRow("Description", "Amount")
        .itemRow("Special Product\n" +
                "Some extra explanations in separate line", BigDecimal.valueOf(1333, 2))
        .itemRow("Short service", BigDecimal.valueOf(103, 1))
        .footerRow("Total", BigDecimal.valueOf(2363, 2))
        .and()
        .button("Download PDF", "http://localhost").gray().right().and()
        .text("If you have any questions about this receipt, simply reply to this email or reach out to our support team for help.").and()
        .copyright("rocketbase").url("https://www.rocketbase.io").suffix(". All rights reserved.").and()
        .footerText("[Company Name, LLC]\n" +
                "1234 Street Rd.\n" +
                "Suite 1234").and()
        .build();

preview HTML-Version

sample-table

sample table with image

TbConfiguration config = TbConfiguration.newInstance();
config.getContent().setWidth(800);

HtmlTextEmail htmlTextEmail = builder
        .configuration(config)
        .header().text(header).and()
        .text("Hi {{name}},").and()
        .text("Thanks for using [Product Name]. This is an invoice for your recent purchase").and()
        .tableSimpleWithImage("#.## '€'")
        .headerRow("Preview", "Description", "Amount")
        .itemRow("https://cdn.shopify.com/s/files/1/0255/1211/6260/products/TCW1142-07052_small.jpg?v=1589200198", "Damen Harbour Tanktop × 1\n" +
                "QUARTZ PINK / S", BigDecimal.valueOf(4995, 2))
        .itemRow("https://cdn.shopify.com/s/files/1/0255/1211/6260/products/TCM1886-0718_201_fdf0be52-639f-4ea8-9143-6bd75e0821b1_small.jpg?v=1583509609", "Herren ten Classic T-Shirt\n"+
                "FOREST GREEN HEATHER / XL", BigDecimal.valueOf(3995, 2))
        .itemRow("https://cdn.shopify.com/s/files/1/0255/1211/6260/products/TCM1939-0439_1332_da6f3e7c-e18d-4778-be97-c6c0b482b643_small.jpg?v=1583509671", "Herren Joshua Hanfshorts\n" +
                "DARK OCEAN BLUE / XL", BigDecimal.valueOf(6995, 2))
        .footerRow("Sum", BigDecimal.valueOf(15985, 2))
        .footerRow("Code - PLANT5", BigDecimal.valueOf(-799, 2))
        .footerRow("Total incl. Tax\n", BigDecimal.valueOf(15186, 2))
        .and()
        .button("Download PDF", "http://localhost").gray().right().and()
        .text("If you have any questions about this receipt, simply reply to this email or reach out to our support team for help.").and()
        .copyright("rocketbase").url("https://www.rocketbase.io").suffix(". All rights reserved.").and()
        .footerText("[Company Name, LLC]\n" +
                "1234 Street Rd.\n" +
                "Suite 1234").and()
        .build();

preview HTML-Version

sample-table

A custom table example could be found in wiki.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].