{"id":13594124,"url":"https://github.com/qferr/mjml-php","last_synced_at":"2026-03-09T15:02:03.437Z","repository":{"id":40706564,"uuid":"252512578","full_name":"qferr/mjml-php","owner":"qferr","description":"A simple PHP library to render MJML to HTML.","archived":false,"fork":false,"pushed_at":"2024-06-16T19:32:56.000Z","size":57,"stargazers_count":68,"open_issues_count":5,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-29T02:38:19.737Z","etag":null,"topics":["email","mjml","mjml-api","php"],"latest_commit_sha":null,"homepage":"https://qferrer.medium.com/rendering-mjml-in-php-982d703aa703","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qferr.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-02T16:45:22.000Z","updated_at":"2024-11-24T10:42:46.000Z","dependencies_parsed_at":"2024-11-06T16:38:56.774Z","dependency_job_id":"61b05562-749c-4968-9eb0-c698a7a3b134","html_url":"https://github.com/qferr/mjml-php","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.25,"last_synced_commit":"c7185024d8b561bd3b532b29f46cba0f4b789b70"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/qferr/mjml-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qferr%2Fmjml-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qferr%2Fmjml-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qferr%2Fmjml-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qferr%2Fmjml-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qferr","download_url":"https://codeload.github.com/qferr/mjml-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qferr%2Fmjml-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30299852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T14:33:48.460Z","status":"ssl_error","status_checked_at":"2026-03-09T14:33:48.027Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["email","mjml","mjml-api","php"],"created_at":"2024-08-01T16:01:29.004Z","updated_at":"2026-03-09T15:02:03.409Z","avatar_url":"https://github.com/qferr.png","language":"PHP","readme":"MJML in PHP\n===========\n\n![PHPUnit](https://github.com/qferr/mjml-php/actions/workflows/php.yml/badge.svg)\n\nA simple PHP library to render MJML to HTML.\n\nThere are two ways for integrating MJML in PHP:\n* using the MJML API\n* using the MJML library\n\n### Installation\n\n```shell script\ncomposer require qferr/mjml-php\n```\n\n### Using MJML library\n\nInstall the MJML library:\n\n```shell script\nnpm install mjml --save\n```\n\nIf you want a specific version, use the following syntax: `npm install mjml@4.7.1 --save`\n\n```php\n\u003c?php\nrequire_once 'vendor/autoload.php';\n\n$renderer = new \\Qferrer\\Mjml\\Renderer\\BinaryRenderer(__DIR__ . '/node_modules/.bin/mjml');\n\n$html = $renderer-\u003erender('\n    \u003cmjml\u003e\n        \u003cmj-body\u003e\n            \u003cmj-section\u003e\n                \u003cmj-column\u003e\n                    \u003cmj-text\u003eHello world\u003c/mj-text\u003e\n                \u003c/mj-column\u003e\n            \u003c/mj-section\u003e\n        \u003c/mj-body\u003e\n    \u003c/mjml\u003e\n');\n```\n\n### Using MJML API\n\n```php\n\u003c?php\nrequire_once 'vendor/autoload.php';\n\n$apiId = 'abcdef-1234-5678-ghijkl';\n$secretKey = 'ghijkl-5678-1234-abcdef';\n\n$api = new \\Qferrer\\Mjml\\Http\\CurlApi($apiId, $secretKey);\n$renderer = new \\Qferrer\\Mjml\\Renderer\\ApiRenderer($api);\n\n$html = $renderer-\u003erender('\n    \u003cmjml\u003e\n        \u003cmj-body\u003e\n            \u003cmj-section\u003e\n                \u003cmj-column\u003e\n                    \u003cmj-text\u003eHello world\u003c/mj-text\u003e\n                \u003c/mj-column\u003e\n            \u003c/mj-section\u003e\n        \u003c/mj-body\u003e\n    \u003c/mjml\u003e\n');\n```\n\nYou can get the version of MJML used by the API to transpile:\n\n```php\n$api-\u003egetMjmlVersion();\n```\n\nMore details in the API documentation: [https://mjml.io/api/documentation](https://mjml.io/api/documentation)\n","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqferr%2Fmjml-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqferr%2Fmjml-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqferr%2Fmjml-php/lists"}