-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Updated mail config - needs testing #17775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,50 +4,31 @@ | |
|-------------------------------------------------------------------------- | ||
| DO NOT EDIT THIS FILE DIRECTLY. | ||
|-------------------------------------------------------------------------- | ||
| This file reads from your .env configuration file and should not | ||
| This file reads from your .env configuration file and should NOT | ||
| be modified directly. | ||
| See https://snipe-it.readme.io/docs/configuration for more info. | ||
*/ | ||
|
||
return [ | ||
|
||
|
||
/* | ||
| *************************************************************************** | ||
| DO NOT MAKE CHANGES DIRECTLY TO THIS FILE. | ||
| | ||
| Instead use your .env file to set your application configuration settings. | ||
| See https://snipe-it.readme.io/docs/configuration for more info. | ||
| | ||
|-------------------------------------------------------------------------- | ||
| Mail Driver | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Laravel supports both SMTP and PHP's "mail" function as drivers for the | ||
| sending of e-mail. You may specify which one you're using throughout | ||
| your application here. By default, Laravel is setup for SMTP mail. | ||
| | ||
| | ||
| Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill", "ses", "log" | ||
| | ||
*/ | ||
return [ | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Default Mailer | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This option controls the default mailer that is used to send any email | ||
| messages sent by your application. Alternative mailers may be setup | ||
| and used as needed; however, this mailer will be used by default. | ||
| This option controls the default mailer that is used to send all email | ||
| messages unless another mailer is explicitly specified when sending | ||
| the message. All additional mailers can be configured within the | ||
| "mailers" array. Examples of each type of mailer are provided. | ||
| | ||
| Previous versions of Snipe-IT and Laravel used SwiftMailer, which used | ||
| MAIL_DRIVER instead of MAIL_MAILER. In order to not break existing | ||
| installations, we'll accept both | ||
| installations, we'll accept both. | ||
| | ||
*/ | ||
|
||
'default' => env('MAIL_DRIVER') != null ? env('MAIL_DRIVER') : env('MAIL_MAILER', 'smtp'), | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Mailer Configurations | ||
|
@@ -57,112 +38,29 @@ | |
| their respective settings. Several examples have been configured for | ||
| you and you are free to add your own as your application requires. | ||
| | ||
| Laravel supports a variety of mail "transport" drivers to be used while | ||
| sending an e-mail. You will specify which one you are using for your | ||
| mailers below. You are free to add additional mailers as required. | ||
| Laravel supports a variety of mail "transport" drivers that can be used | ||
| when delivering an email. You may specify which one you're using for | ||
| your mailers below. You may also add additional mailers if needed. | ||
| | ||
| Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2", | ||
| "postmark", "log", "array", "failover", "roundrobin" | ||
| "postmark", "resend", "log", "array", | ||
| "failover", "roundrobin" | ||
| | ||
*/ | ||
|
||
'mailers' => [ | ||
|
||
'smtp' => [ | ||
// Don't touch this. For the smtp mailer, the transport needs to be smtp | ||
'transport' => 'smtp', | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| SMTP Host Address | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Here you may provide the host address of the SMTP server used by your | ||
| applications. A default option is provided that is compatible with | ||
| the Mailgun mail service which will provide reliable deliveries. | ||
| | ||
*/ | ||
'host' => env('MAIL_HOST', 'smtp.mailgun.org'), | ||
|
||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| SMTP Host Port | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This is the SMTP port used by your application to deliver e-mails to | ||
| users of the application. Like the host we have set this value to | ||
| stay compatible with the Mailgun e-mail application by default. | ||
| | ||
*/ | ||
|
||
'port' => env('MAIL_PORT', 587), | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| SMTP Server Username | ||
|-------------------------------------------------------------------------- | ||
| | ||
| If your SMTP server requires a username for authentication, you should | ||
| set it here. This will get used to authenticate with your server on | ||
| connection. You may also set the "password" value below this one. | ||
| | ||
*/ | ||
|
||
'scheme' => env('MAIL_SCHEME'), | ||
'url' => env('MAIL_URL'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And this also - is that the base URL for images or links in mail, or something else? |
||
'host' => env('MAIL_HOST', '127.0.0.1'), | ||
'port' => env('MAIL_PORT', 2525), | ||
'username' => env('MAIL_USERNAME'), | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| SMTP Server Password | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Here you may set the password required by your SMTP server to send out | ||
| messages from your application. This will be given to the server on | ||
| connection so that the application will be able to send messages. | ||
| | ||
*/ | ||
|
||
'password' => env('MAIL_PASSWORD'), | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| SMTP Server connection timeout | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Give up trying to connect to the mail server after this many seconds | ||
| | ||
*/ | ||
|
||
'timeout' => 30, | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| mostly pointless encryption option | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This used to let you specify whether or not to use TLS, but now it really | ||
| just helps inform the code about which SMTP port to use. SymfonMailer will | ||
| still use TLS if the server offers it, regardless of how this is set. | ||
| We're only including it here for reference, and the extreme edge-case where | ||
| Symfony can't figure out what to do on its own. | ||
| | ||
*/ | ||
|
||
'encryption' => env('MAIL_ENCRYPTION', 'tls'), | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Verify SMTP TLS certificate | ||
|-------------------------------------------------------------------------- | ||
| | ||
| As noted above, Swiftmailer WILL use TLS if the server offers it, so if | ||
| you're using a self-signed certificate or want to refer to your mailserver | ||
| by a name that isn't in the certificate (like the IP address), set this | ||
| to 0 or false. | ||
| | ||
*/ | ||
|
||
'timeout' => null, | ||
'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url(env('APP_URL', 'http://localhost'), PHP_URL_HOST)), | ||
'verify_peer' => env('MAIL_TLS_VERIFY_PEER', 1), | ||
|
||
], | ||
|
||
'ses' => [ | ||
|
@@ -171,29 +69,16 @@ | |
|
||
'postmark' => [ | ||
'transport' => 'postmark', | ||
// 'message_stream_id' => null, | ||
// 'message_stream_id' => env('POSTMARK_MESSAGE_STREAM_ID'), | ||
// 'client' => [ | ||
// 'timeout' => 5, | ||
// ], | ||
], | ||
|
||
'mailgun' => [ | ||
'transport' => 'mailgun', | ||
// 'client' => [ | ||
// 'timeout' => 5, | ||
// ], | ||
'resend' => [ | ||
'transport' => 'resend', | ||
], | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Sendmail System Path | ||
|-------------------------------------------------------------------------- | ||
| | ||
| When using the "sendmail" driver to send e-mails, we will need to know | ||
| the path to where Sendmail lives on this server. A default path has | ||
| been provided here, which will work well on most of your systems. | ||
| | ||
*/ | ||
'sendmail' => [ | ||
'transport' => 'sendmail', | ||
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), | ||
|
@@ -223,22 +108,23 @@ | |
'postmark', | ||
], | ||
], | ||
|
||
], | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Global "From" Address | ||
|-------------------------------------------------------------------------- | ||
| | ||
| You may wish for all e-mails sent by your application to be sent from | ||
| the same address. Here, you may specify a name and address that is | ||
| used globally for all e-mails that are sent by your application. | ||
| You may wish for all emails sent by your application to be sent from | ||
| the same address. Here you may specify a name and address that is | ||
| used globally for all emails that are sent by your application. | ||
| | ||
*/ | ||
|
||
'from' => [ | ||
'address' => env('MAIL_FROM_ADDR', null), | ||
'name' => env('MAIL_FROM_NAME', null), | ||
'address' => env('MAIL_FROM_ADDRESS', '[email protected]'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changing the name of this env('MAIL_FROM_ADDRESS',env('MAIL_FROM_ADDR','[email protected]')) That way the old env var will still work - this could definitely be an issue for our hosted platform. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (See how @jerm handled this in |
||
'name' => env('MAIL_FROM_NAME', 'Example'), | ||
], | ||
|
||
/* | ||
|
@@ -257,23 +143,5 @@ | |
'name' => env('MAIL_REPLYTO_NAME', null), | ||
], | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Markdown Mail Settings | ||
|-------------------------------------------------------------------------- | ||
| | ||
| If you are using Markdown based email rendering, you may configure your | ||
| theme and component paths here, allowing you to customize the design | ||
| of the emails. Or, you may simply stick with the Laravel defaults! | ||
| | ||
*/ | ||
|
||
'markdown' => [ | ||
'theme' => 'default', | ||
|
||
'paths' => [ | ||
resource_path('views/vendor/mail'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This path is still populated - is removing this needed? Or is it a default that's now fully-baked in, and thus no longer needed in this config file? |
||
], | ||
], | ||
|
||
]; | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this do?