mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-24 08:51:25 -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_PASSWORD=null
|
||||
MAIL_ENCRYPTION=tls
|
||||
MAIL_SENDFROM=null
|
||||
MAIL_SENDTO=null
|
||||
MAIL_FROM_ADDRESS=null
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
MAIL_TO_ADDRESS=null
|
||||
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
|
|
|
@ -29,11 +29,10 @@ class ApiController extends Controller {
|
|||
$contact->message = $request['message'];
|
||||
$contact->save();
|
||||
|
||||
// Send the email if the MAIL_SENDTO variable is set
|
||||
if (env('MAIL_SENDTO') != null) {
|
||||
// Send the email if the MAIL_TO_ADDRESS variable is set
|
||||
if (env('MAIL_TO_ADDRESS') != null) {
|
||||
Mail::send('email.contact', [ 'contact' => $contact ], function($mail) use ($contact) {
|
||||
$mail->from(env('MAIL_SENDFROM'), env('APP_NAME'))
|
||||
->to(env('MAIL_SENDTO'))
|
||||
$mail->to(env('MAIL_TO_ADDRESS'))
|
||||
->subject('Contact form submission');
|
||||
});
|
||||
}
|
||||
|
|
|
@ -56,8 +56,8 @@ return [
|
|||
*/
|
||||
|
||||
'from' => [
|
||||
'address' => env('MAIL_SENDFROM', null),
|
||||
'name' => env('APP_NAME', null),
|
||||
'address' => env('MAIL_FROM_ADDRESS', null),
|
||||
'name' => env('MAIL_FROM_NAME', null),
|
||||
],
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue