{"id":26931754,"url":"https://github.com/truongwp/email","last_synced_at":"2026-04-15T18:01:58.216Z","repository":{"id":57073070,"uuid":"101378675","full_name":"truongwp/email","owner":"truongwp","description":"Abstract class for email sending in WordPress","archived":false,"fork":false,"pushed_at":"2017-08-31T15:41:10.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-19T16:42:16.877Z","etag":null,"topics":["email","email-sender","wordpress"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/truongwp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-25T07:35:31.000Z","updated_at":"2021-07-15T13:49:55.000Z","dependencies_parsed_at":"2022-08-24T14:54:39.988Z","dependency_job_id":null,"html_url":"https://github.com/truongwp/email","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/truongwp/email","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truongwp%2Femail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truongwp%2Femail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truongwp%2Femail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truongwp%2Femail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/truongwp","download_url":"https://codeload.github.com/truongwp/email/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truongwp%2Femail/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31853279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"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","email-sender","wordpress"],"created_at":"2025-04-02T07:18:53.556Z","updated_at":"2026-04-15T18:01:58.197Z","avatar_url":"https://github.com/truongwp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"An abstract class for email sending in WordPress.\n\n## Installation\n\nUse composer to include the library:\n\n`\ncomposer require truongwp/email=\"*\"\n`\n\n## Usage\n\n```php\n/**\n * Class ExampleEmail\n */\nclass ExampleEmail extends Truongwp\\Email {\n\n\t/**\n\t * Whether to use HTML in email.\n\t *\n\t * @var bool\n\t */\n\tprotected $html = true;\n\n\t/**\n\t * Gets email subject.\n\t *\n\t * @return string\n\t */\n\tprotected function subject() {\n\t\treturn 'Example email subject';\n\t}\n\n\t/**\n\t * Gets email content body.\n\t *\n\t * @return string\n\t */\n\tprotected function content_body() {\n\t\treturn '\u003cp\u003eHi %%customer_name%%.\u003cbr\u003eThis is an example email from \u003cspan class=\"red\"\u003e%%site_name%%\u003c/span\u003e\u003c/p\u003e';\n\t}\n\n\t/**\n\t * Gets email content footer.\n\t *\n\t * @return string\n\t */\n\tprotected function content_footer() {\n\t\tif ( $this-\u003ehtml ) {\n\t\t\treturn '\u003cp\u003eBest Regards,\u003cbr\u003eTruongwp\u003c/p\u003e';\n\t\t}\n\n\t\treturn \"Best Regards,\\nTruongwp\";\n\t}\n\n\t/**\n\t * Gets css for email content.\n\t *\n\t * @return string\n\t */\n\tprotected function content_css() {\n\t\treturn '.red { color: red; }';\n\t}\n}\n\n$email = new ExampleEmail();\n$email-\u003ereplace( '%%customer_name%%', 'Truong' );\n$email-\u003esend( 'truongwp@gmail.com' );\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftruongwp%2Femail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftruongwp%2Femail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftruongwp%2Femail/lists"}