{"id":20236208,"url":"https://github.com/bakaphp/mail","last_synced_at":"2025-09-08T07:42:52.486Z","repository":{"id":62491388,"uuid":"122410532","full_name":"bakaphp/mail","owner":"bakaphp","description":"PhalconPHP email wrapper for Swiftmailer for sending emails with Queue","archived":false,"fork":false,"pushed_at":"2020-04-29T22:35:58.000Z","size":61,"stargazers_count":4,"open_issues_count":2,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-10T19:16:50.868Z","etag":null,"topics":["beanstalkd","mail","phalcon","phalcon-php","phalconphp","queue"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bakaphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-22T00:17:38.000Z","updated_at":"2021-06-17T09:44:33.000Z","dependencies_parsed_at":"2022-11-02T11:15:57.622Z","dependency_job_id":null,"html_url":"https://github.com/bakaphp/mail","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/bakaphp/mail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakaphp%2Fmail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakaphp%2Fmail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakaphp%2Fmail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakaphp%2Fmail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bakaphp","download_url":"https://codeload.github.com/bakaphp/mail/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakaphp%2Fmail/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274152756,"owners_count":25231293,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["beanstalkd","mail","phalcon","phalcon-php","phalconphp","queue"],"created_at":"2024-11-14T08:19:33.721Z","updated_at":"2025-09-08T07:42:52.449Z","avatar_url":"https://github.com/bakaphp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phalcon\\Mailer\n\nBaka email wrapper for Swiftmailer with queue\n\n## Configure\n\n**SMTP**\n\n```php\n'email' =\u003e [\n    'driver' =\u003e 'smtp',\n    'host' =\u003e getenv('EMAIL_HOST'),\n    'port' =\u003e getenv('EMAIL_PORT'),\n    'username' =\u003e getenv('EMAIL_USER'),\n    'password' =\u003e getenv('EMAIL_PASS'),\n    'from' =\u003e [\n        'email' =\u003e 'noreply@domain.do',\n        'name' =\u003e 'YOUR FROM NAME',\n    ],\n    'debug' =\u003e [\n        'from' =\u003e [\n            'email' =\u003e 'noreply@domain.do',\n            'name' =\u003e 'YOUR FROM NAME',\n        ],\n    ],\n];\n```\n\n## Setup DI\n\n**createMessage()**\n\n```php\n$di-\u003eset('mail', function () use ($config, $di) {\n\n    //setup\n    $mailer = new \\Baka\\Mail\\Manager($config-\u003eemail-\u003etoArray());\n\n    return $mailer-\u003ecreateMessage();\n});\n```\n\n**Sending a normal email()**\n```php\n  $this-\u003email\n    -\u003eto('info@domain.do')\n    -\u003esubject('Test Normal Email queue')\n    -\u003econtent('normal email send via queue')\n    -\u003esend();\n];\n\n```\n\n**Sending a template normal email()**\n```php\n  $this-\u003email\n    -\u003eto('info@domain.dom')\n    -\u003esubject('Test Template Email queue')\n    -\u003eparams(['name' =\u003e 'test'])\n    -\u003etemplate('email.volt') //you can also use template() default template is email.volt\n    -\u003esend();\n];\n\n```\n\n**Sending a normal email instantly, without queue()**\n```php\n  $this-\u003email\n    -\u003eto('info@domain.do')\n    -\u003esubject('Test Normal Email now')\n    -\u003econtent('send normal email now')\n    -\u003esendNow();\n];\n\n```\n\n## Events\n- `mailer:beforeCreateMessage`\n- `mailer:afterCreateMessage`\n- `mailer:beforeSend`\n- `mailer:afterSend`\n- `mailer:beforeAttachFile`\n- `mailer:afterAttachFile`\n\n\n## Setup CLI\n\n```php\n\nuse Phalcon\\Cli\\Task;\n\n/**\n * Class LsTask\n * @description('List directory content', 'The content will be displayed in the standard output')\n */\nclass MainTask extends Task\n{\n    use Baka\\Mail\\JobTrait;\n}\n\n```\n\n## Running CLI\n\n`php app.php main mailqueue email_queue`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbakaphp%2Fmail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbakaphp%2Fmail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbakaphp%2Fmail/lists"}