{"id":23165957,"url":"https://github.com/ndejong/cakephpemogrifierplugin","last_synced_at":"2025-08-03T17:36:40.170Z","repository":{"id":2070968,"uuid":"3009854","full_name":"ndejong/CakephpEmogrifierPlugin","owner":"ndejong","description":"CakephpEmogrifierPlugin is a CakePHP 2.x Plugin that makes of using Emogrify on your HTML output easy.","archived":false,"fork":false,"pushed_at":"2018-07-15T14:21:13.000Z","size":34,"stargazers_count":8,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-03-16T04:30:52.249Z","etag":null,"topics":["cakephp-plugin","cakephp2","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"AlexanderAA/ledger_binaries_windows","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ndejong.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-12-19T04:30:00.000Z","updated_at":"2022-03-28T07:18:10.000Z","dependencies_parsed_at":"2022-09-04T15:34:12.107Z","dependency_job_id":null,"html_url":"https://github.com/ndejong/CakephpEmogrifierPlugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndejong%2FCakephpEmogrifierPlugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndejong%2FCakephpEmogrifierPlugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndejong%2FCakephpEmogrifierPlugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndejong%2FCakephpEmogrifierPlugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ndejong","download_url":"https://codeload.github.com/ndejong/CakephpEmogrifierPlugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230204092,"owners_count":18189716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cakephp-plugin","cakephp2","php"],"created_at":"2024-12-18T01:30:45.962Z","updated_at":"2024-12-18T01:30:46.627Z","avatar_url":"https://github.com/ndejong.png","language":"PHP","readme":"CakephpEmogrifierPlugin\n=======================\n\nCakephpEmogrifierPlugin is a CakePHP 2.x Plugin that makes of using Emogrify on\nyour HTML output easy.\n\nWondering what Emogrify is?  Emogrifier is a great library from Pelago that deals\nwith much of the hassle involved with HTML formatted email messages:-\n\n - http://www.pelagodesign.com/sidecar/emogrifier/\n - https://github.com/jjriv/emogrifier\n\nThis Plugin is a wrapper around Emogrifier making it easy to use in CakePHP 2.0x\n\n\nInstall\n-------\n\n### Step 1\nCopy or symlink CakephpEmogrifierPlugin into a path named Emogrifier in your Plugin\npath like this:-\n\n    %APP%/Plugin/Emogrifier\n\nTake careful note of the Plugin pathname, the name is \"Emogrifier\", not \nEmogrifierPlugin or CakephpEmogrifierPlugin, it's just Emogrifier.  I spell this \nout because it's an easy thing to trip up on especially if your pulling this down \nfrom github or unpacking from a tarball.\n\n### Step 2 (optional)\nUpdate the Emogrifier library from https://github.com/jjriv/emogrifier into the \nVendor path of CakephpEmogrifierPlugin\n\n    cd %APP%/Plugin/Emogrifier/Vendor\n    git clone https://github.com/jjriv/emogrifier\n\nNB: the Emogrifier.php that ships with CakephpEmogrifierPlugin will only be used\nif you do not clone in the latest from https://github.com/jjriv/emogrifier\n\nNB2: it is safe to remove %APP%/Plugin/Emogrifier/Vendor/Emogrifier.php after you\nhave cloned the latest https://github.com/jjriv/emogrifier to make it available\nto the CakephpEmogrifierPlugin plugin\n\n### Step 3\nBe sure to load the plugin in your bootstrap.php or core.php, like this:-\n\n    CakePlugin::load('Emogrifier');\n\nIf you adjust the bootstrap.php in config for CakephpEmogrifierPlugin you will \nneed to make sure it gets parsed like this:-\n\n    CakePlugin::loadAll(array(\n        'Emogrifier' =\u003e array('bootstrap' =\u003e true)\n    ));\n\nThe alternative is to note the Configure::write() options and set these from your\nown application bootstrap.php\n\n### Step 4.a (for the email case)\nTell CakeEmail to Emogrify the HTML rendering by calling viewRender()\n\n    $email = new CakeEmail();\n    $email-\u003eviewRender('Emogrifier.Emogrifier');\n    $email-\u003eemailFormat('html');\n    $email-\u003esend('hello world');\n\n### Step 4.b (for web output, if you really wanted this...)\nTell your controller to render your view with Emogrifier like this:-\n\n    $this-\u003eviewClass = 'Emogrifier.Emogrifier';\n\n\nQuestions and Answers\n---------------------\nQ: Pelago's Emogrifier class requires you to pass in the CSS but this plugin does\n   not, what's going on? \nA: We parse the HTML from the View-\u003eoutput attribute looking for CSS from link\n   and style elements then stich the whole thing together - it makes using this\n   a little easier.\n\nQ: I'm using Emogrifier before rendering to webpages and I can't see any difference \nA: Take a look at the HTML source, you should notice that all your CSS styles are\n   now inline element style attributes.\n\nQ: I want to use a custom (forked) Emogrifier.php how can I do that?\nA: Take a look at Configure::write('Emogrifier.include','/foo/bar/Emogrifier.php');\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndejong%2Fcakephpemogrifierplugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fndejong%2Fcakephpemogrifierplugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndejong%2Fcakephpemogrifierplugin/lists"}