Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jozan/themosis-mailgun-wrapper
A simple Mailgun wrapper for Themosis Framework
https://github.com/jozan/themosis-mailgun-wrapper
Last synced: 30 days ago
JSON representation
A simple Mailgun wrapper for Themosis Framework
- Host: GitHub
- URL: https://github.com/jozan/themosis-mailgun-wrapper
- Owner: jozan
- License: mit
- Created: 2015-07-23T18:43:36.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-07-24T19:09:14.000Z (over 9 years ago)
- Last Synced: 2024-11-14T11:17:00.018Z (3 months ago)
- Language: PHP
- Size: 141 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# themosis-mailgun-wrapper
A simple Mailgun wrapper for [Themosis Framework](http://framework.themosis.com/).### Quick Setup
Open up `.env.*.php` in your project root and add the following lines at the end of array:
```php
'MAILGUN_KEY' => 'your mailgun key',
'MAILGUN_DOMAIN' => 'your mailgun domain',
```### Example usage
```php
// Somewhere in your php code...use Latehours\Mailgun\Mail;
$mail = new Mail();
$message = ['greeting' => 'Thanks for registering!'];
// 'emails.greeting' is a Scout template
// $message is an array passed to the view
$mail->send('emails.greeting', $message, [
'from' => 'Admin ',
'to' => 'Awesome Dude ',
'subject' => 'Thanks for registering!'
]);
```
Example view `views/emails/greeting.scout.php`:
```php
{{ $greeting }}
```