{"id":30280567,"url":"https://github.com/maantje/laravel-react-email","last_synced_at":"2025-08-16T15:18:20.362Z","repository":{"id":65680289,"uuid":"596770719","full_name":"maantje/laravel-react-email","owner":"maantje","description":"React email for Laravel","archived":false,"fork":false,"pushed_at":"2025-03-01T21:45:10.000Z","size":96,"stargazers_count":46,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-07-12T04:39:23.857Z","etag":null,"topics":["laravel","react-email"],"latest_commit_sha":null,"homepage":"","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/maantje.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-02-02T22:19:46.000Z","updated_at":"2025-07-08T11:56:28.000Z","dependencies_parsed_at":"2023-11-21T18:43:27.929Z","dependency_job_id":null,"html_url":"https://github.com/maantje/laravel-react-email","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"c6c2fd7bbadb98ef67c7007b3a69814ab931fb8a"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/maantje/laravel-react-email","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maantje%2Flaravel-react-email","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maantje%2Flaravel-react-email/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maantje%2Flaravel-react-email/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maantje%2Flaravel-react-email/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maantje","download_url":"https://codeload.github.com/maantje/laravel-react-email/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maantje%2Flaravel-react-email/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270729319,"owners_count":24635404,"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-08-16T02:00:11.002Z","response_time":91,"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":["laravel","react-email"],"created_at":"2025-08-16T15:18:19.743Z","updated_at":"2025-08-16T15:18:20.337Z","avatar_url":"https://github.com/maantje.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Email for Laravel\n\nEasily send [React Email](https://react.email/) emails with Laravel using this package.\n\n## Installation\n\nFirst, install the package via Composer:\n\n```bash\ncomposer require maantje/react-email\n```\n\nThen, install the required Node dependencies:\n\n```bash\nnpm install vendor/maantje/react-email\n```\n\n## Getting Started\n\n1. Install React Email using the [automatic](https://react.email/docs/getting-started/automatic-setup) or [manual](https://react.email/docs/getting-started/manual-setup) setup.\n2. Create an email component in the `emails` directory (e.g., `new-user.tsx`). Ensure the component is the default export.\n\nExample email component:\n\n```tsx\nimport * as React from 'react';\nimport { Text, Html } from '@react-email/components';\n\nexport default function Email({ user }) {\n    return (\n        \u003cHtml\u003e\n            \u003cText\u003eHello, {user.name}\u003c/Text\u003e\n        \u003c/Html\u003e\n    );\n}\n```\n\n3. Define the email directory path in your Laravel `.env` file:\n\n```env\nREACT_EMAIL_DIRECTORY=\"emails/directory/relative/from/laravel/root\"\n```\n\n4. Generate a new Laravel Mailable class:\n\n```bash\nphp artisan make:mail NewUser\n```\n\n5. Use `ReactMailView` in your `Mailable`, or extend your `Mailable` from `ReactMailable``\n\n```php\nuse App\\Models\\User;\nuse Maantje\\ReactEmail\\ReactMailable;\nuse Illuminate\\Mail\\Mailables\\Envelope;\nuse Illuminate\\Mail\\Mailables\\Content;\nuse Maantje\\ReactEmail\\ReactMailView;\n\nclass NewUser extends ReactMailable // Extend, from \\Maantje\\ReactEmail\\ReactMailable\n{\n    use ReactMailView; // or use \\Maantje\\ReactEmail\\ReactMailView\n    \n    public function __construct(public User $user)\n    {\n        // Public properties will be passed as props to the React email component.\n        // Alternatively, use the `with` property of `content`.\n    }\n    \n    public function envelope()\n    {\n        return new Envelope(\n            subject: 'New User',\n        );\n    }\n\n    public function content()\n    {\n        return new Content(\n            view: 'new-user', // Component filename without the extension\n        );\n    }\n}\n```\n\n## Running Tests\n\nRun tests using [Pest](https://pestphp.com/):\n\n```bash\n./vendor/bin/pest\n```\n\n## Security\n\nIf you discover any security-related issues, please email the author instead of using the issue tracker.\n\n## License\n\nThis package is open-source and licensed under the MIT License. See the [LICENSE](/LICENSE) file for details.~~\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaantje%2Flaravel-react-email","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaantje%2Flaravel-react-email","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaantje%2Flaravel-react-email/lists"}