Code Monkey home page Code Monkey logo

phtemail's Introduction

phtemail

Php Html email builder

Scrutinizer Code Quality Build Status Latest Stable Version License

Wanting to send html emails from some apps, I have used some times email templates edited by hand, meaning needing to look into boring html table structure from an extisting template, hard code the email content, or place some tags to be replaced later with real content by the code that needs to retreive the template, search replace tags, etc... That's so boring

Kristuff\Phtemail lets you create your template on the fly. Then, you are free to save it or send it immediately. The library comes with a centered layout, custom html elements for layout and email content, predefined styles, and methods / ways to customize the email as you need.

Requirments

  • PHP >= 7.1
  • Composer (for install)

Install

  • Install with composer:

    $  composer require kristuff/phtemail
    
  • Or deploy in your project (in composer.json):

    {
        ...
        "require": {
            "kristuff/phtemail": ">=0.1-stable"
        }
    }
    

Sample

Basic sample:

<?php
require_once '../vendor/autoload.php';

use Kristuff\Phtemail\HtmlEmailBuilder;
use Kristuff\Phtemail\HtmlElements;

// Create a new instance an HtmlEmailBuilder 
$builder = new HtmlEmailBuilder();

//todo

// Get the generated email
email = $builder->getHtml();

Licence

MIT

phtemail's People

Contributors

kristuff avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

phtemail's Issues

example

hi do you have a better example how to create a email?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.