{"id":18794546,"url":"https://github.com/effectra/mail","last_synced_at":"2025-12-29T18:30:15.244Z","repository":{"id":182727529,"uuid":"655429603","full_name":"effectra/mail","owner":"effectra","description":"Effectra\\Mail is a package that provides a flexible and easy-to-use email sending functionality for your applications. It supports multiple mail drivers and allows you to configure various email settings such as the mail server host, port, authentication, and more.","archived":false,"fork":false,"pushed_at":"2024-01-02T18:55:43.000Z","size":55,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-12-29T16:34:01.713Z","etag":null,"topics":["imap","mail","php","phpmailer","phpmailer-library","pop3","sendmail","smtp"],"latest_commit_sha":null,"homepage":"","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/effectra.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":"2023-06-18T21:33:13.000Z","updated_at":"2024-06-19T08:38:53.000Z","dependencies_parsed_at":"2024-01-02T19:47:03.611Z","dependency_job_id":"66bfabfa-0c82-446c-ad2e-9f4fd5ff58a3","html_url":"https://github.com/effectra/mail","commit_stats":null,"previous_names":["effectra/mail"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Fmail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Fmail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Fmail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Fmail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/effectra","download_url":"https://codeload.github.com/effectra/mail/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239718692,"owners_count":19685795,"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","mail","php","phpmailer","phpmailer-library","pop3","sendmail","smtp"],"created_at":"2024-11-07T21:29:44.509Z","updated_at":"2025-12-29T18:30:13.190Z","avatar_url":"https://github.com/effectra.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Effectra\\Mail\n\nEffectra\\Mail is a package that provides a flexible and easy-to-use email sending functionality for your applications. It supports multiple mail drivers and allows you to configure various email settings such as the mail server host, port, authentication, and more.\n\n## Features\n\n- Support for multiple mail drivers (SMTP, sendmail, etc.)\n- Configuration options for mail server settings\n- Easy setup and usage\n- Exception handling for mail sending errors\n\n## Installation\n\nYou can install the Effectra\\Mail package via Composer. Run the following command in your terminal:\n\n```bash\ncomposer require effectra/mail\n```\n\n## Usage\n\n### Creating a Mailer Instance\n\nTo send emails using the Effectra\\Mail package, you need to create a mailer instance. The `MailerFactory` class provides a convenient way to create the mailer instance:\n\n```php\nuse Effectra\\Mail\\Mailer;\n\n// Create a mailer instance\n$mailer = new Mailer(\n    'smtp',         // Mail driver (e.g., 'smtp', 'sendmail')\n    'mail.example.com',  // Mail server host\n    587,            // Mail server port\n    'username',     // Username for authentication\n    'password',     // Password for authentication\n    'info@example.com'  // \"From\" email address\n);\n```\n\n### Sending an Email\n\nOnce you have a mailer instance, you can use it to send emails. The `Mailer` class provides methods for setting the email recipients, subject, content, and more. Here's an example of sending an email:\n\n```php\n$mail = new Mail();\n// Set email recipients\n$mail-\u003eto('recipient1@example.com');\n$mail-\u003ecc('recipient2@example.com');\n$mail-\u003ebcc('recipient3@example.com');\n\n// Set email subject and content\n$mail-\u003esubject('Hello, world!');\n$mail-\u003etext('This is the plain text content of the email.');\n$mail-\u003ehtml('\u003cp\u003eThis is the HTML content of the email.\u003c/p\u003e');\n\n// Send the email\ntry {\n    $mailer-\u003esend($mail);\n    echo 'Email sent successfully!';\n} catch (Exception $e) {\n    echo 'An error occurred while sending the email: ' . $e-\u003egetMessage();\n}\n```\n\nFeel free to explore the `Mailer` class and its methods to customize the email sending process according to your needs.\n\n## License\n\nThis package is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT).\n\n## Contributing\n\nContributions are welcome! If you encounter any issues or have suggestions for improvements, please create an issue or submit a pull request on the GitHub repository.\n\n## Credits\n\nEffectra\\Mail is developed and maintained by [Mohammed Taha](https://github.com/bmtMohammedTaha).\n\n## Support\n\nFor any questions or support regarding the Effectra\\Mail package, please contact [support@example.com](mailto:support@example.com).\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feffectra%2Fmail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feffectra%2Fmail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feffectra%2Fmail/lists"}