{"id":21056014,"url":"https://github.com/xp-framework/mail","last_synced_at":"2025-04-30T09:21:30.821Z","repository":{"id":11788069,"uuid":"14329937","full_name":"xp-framework/mail","owner":"xp-framework","description":"E-Mail APIs, POP3, IMAP, MailDir, SMTP support for the XP Framework","archived":false,"fork":false,"pushed_at":"2022-02-27T10:17:35.000Z","size":3364,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-21T12:55:45.229Z","etag":null,"topics":["imap","maildir","php","pop","smtp","xp-framework"],"latest_commit_sha":null,"homepage":null,"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/xp-framework.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","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":"2013-11-12T11:08:15.000Z","updated_at":"2022-02-27T10:02:42.000Z","dependencies_parsed_at":"2022-09-23T02:02:47.241Z","dependency_job_id":null,"html_url":"https://github.com/xp-framework/mail","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-framework%2Fmail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-framework%2Fmail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-framework%2Fmail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-framework%2Fmail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xp-framework","download_url":"https://codeload.github.com/xp-framework/mail/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251674987,"owners_count":21625716,"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":["imap","maildir","php","pop","smtp","xp-framework"],"created_at":"2024-11-19T16:48:18.743Z","updated_at":"2025-04-30T09:21:30.801Z","avatar_url":"https://github.com/xp-framework.png","language":"PHP","readme":"Mail for XP\n===========\n\n[![Build status on GitHub](https://github.com/xp-framework/mail/workflows/Tests/badge.svg)](https://github.com/xp-framework/mail/actions)\n[![XP Framework Module](https://raw.githubusercontent.com/xp-framework/web/master/static/xp-framework-badge.png)](https://github.com/xp-framework/core)\n[![BSD Licence](https://raw.githubusercontent.com/xp-framework/web/master/static/licence-bsd.png)](https://github.com/xp-framework/core/blob/master/LICENCE.md)\n[![Requires PHP 7.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-7_0plus.svg)](http://php.net/)\n[![Supports PHP 8.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-8_0plus.svg)](http://php.net/)\n[![Latest Stable Version](https://poser.pugx.org/xp-framework/mail/version.png)](https://packagist.org/packages/xp-framework/mail)\n\nE-Mail APIs, POP3, IMAP, MailDir, SMTP support.\n\n## Creating an email\n\n```php\nuse peer\\mail\\{Message, InternetAddress};\n\n$msg= new Message();\n$msg-\u003esetFrom(new InternetAddress('friebe@example.com', 'Timm Friebe'));\n$msg-\u003eaddRecipient(TO, new InternetAddress('foo@bar.baz', 'Foo Bar'));\n$msg-\u003eaddRecipient(CC, new InternetAddress('timm@foo.bar', 'Timm Friebe'));\n$msg-\u003esetHeader('X-Binford', '6100 (more power)');\n$msg-\u003esetSubject('Hello world');\n$msg-\u003esetBody('Testmail');\n```\n\n## Sending email\n\n```php\nuse peer\\mail\\transport\\{MailTransport, TransportException};\n\n$smtp= new MailTransport();\ntry {\n  $smtp-\u003econnect();\n  $smtp-\u003esend($msg);\n} catch (TransportException $e) {\n  $e-\u003eprintStackTrace();\n}\n\n$smtp-\u003eclose();\n```\n\n## Using an SMTP server\n\n```php\nuse peer\\mail\\transport\\{SmtpConnection, TransportException};\n\n$smtp= new SmtpConnection('esmtp://user:pass@mail.example.com:25/?auth=login');\ntry {\n  $smtp-\u003econnect();\n  $smtp-\u003esend($msg);\n} catch (TransportException $e) {\n  $e-\u003eprintStackTrace();\n}\n\n$smtp-\u003eclose();\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxp-framework%2Fmail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxp-framework%2Fmail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxp-framework%2Fmail/lists"}