mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-09 19:26:38 -05:00
Pull in upstream changes to the mail variables
This commit is contained in:
parent
333827eaae
commit
c2c66e460b
3 changed files with 8 additions and 8 deletions
|
@ -36,8 +36,9 @@ MAIL_PORT=587
|
||||||
MAIL_USERNAME=null
|
MAIL_USERNAME=null
|
||||||
MAIL_PASSWORD=null
|
MAIL_PASSWORD=null
|
||||||
MAIL_ENCRYPTION=tls
|
MAIL_ENCRYPTION=tls
|
||||||
MAIL_SENDFROM=null
|
MAIL_FROM_ADDRESS=null
|
||||||
MAIL_SENDTO=null
|
MAIL_FROM_NAME="${APP_NAME}"
|
||||||
|
MAIL_TO_ADDRESS=null
|
||||||
|
|
||||||
AWS_ACCESS_KEY_ID=
|
AWS_ACCESS_KEY_ID=
|
||||||
AWS_SECRET_ACCESS_KEY=
|
AWS_SECRET_ACCESS_KEY=
|
||||||
|
|
|
@ -29,11 +29,10 @@ class ApiController extends Controller {
|
||||||
$contact->message = $request['message'];
|
$contact->message = $request['message'];
|
||||||
$contact->save();
|
$contact->save();
|
||||||
|
|
||||||
// Send the email if the MAIL_SENDTO variable is set
|
// Send the email if the MAIL_TO_ADDRESS variable is set
|
||||||
if (env('MAIL_SENDTO') != null) {
|
if (env('MAIL_TO_ADDRESS') != null) {
|
||||||
Mail::send('email.contact', [ 'contact' => $contact ], function($mail) use ($contact) {
|
Mail::send('email.contact', [ 'contact' => $contact ], function($mail) use ($contact) {
|
||||||
$mail->from(env('MAIL_SENDFROM'), env('APP_NAME'))
|
$mail->to(env('MAIL_TO_ADDRESS'))
|
||||||
->to(env('MAIL_SENDTO'))
|
|
||||||
->subject('Contact form submission');
|
->subject('Contact form submission');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,8 +56,8 @@ return [
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'from' => [
|
'from' => [
|
||||||
'address' => env('MAIL_SENDFROM', null),
|
'address' => env('MAIL_FROM_ADDRESS', null),
|
||||||
'name' => env('APP_NAME', null),
|
'name' => env('MAIL_FROM_NAME', null),
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue