CakePHP Cookbook 2.x
com', 'password' => 'secret', 'transport' => 'Smtp' ); } You can also use tls:// to prefer TLS for connection level encryption. Warning You will need to have access for less secure apps To use either the ssl:// or tls:// feature, you will need to have the SSL configured in your PHP install. As of 2.3.0 you can also enable STARTTLS SMTP extension using the tls option: class EmailConfig 'transport' => 'Smtp', 'tls' => true ); } The above configuration would enable STARTTLS communication for email messages. New in version 2.3: Support for TLS delivery was added in 2.3 Configurations0 码力 | 1096 页 | 958.62 KB | 1 年前3CakePHP Cookbook Documentation 5.x
'username' => 'my@gmail.com', 'password' => 'secret', 'className' => 'Smtp', 'tls' => true, ], ], Transports can also be configured at runtime using TransportFactory::setConfig(): the ssl:// prefix in the host and configure the port value accordingly. You can also enable TLS SMTP using the tls option: use Cake\Mailer\TransportFactory; TransportFactory::setConfig('gmail', [ 'host' 'my@gmail.com', 'password' => 'secret', 'className' => 'Smtp', 'tls' => true ]); The above configuration would enable TLS communication for email messages. To configure your mailer to use a specific0 码力 | 1080 页 | 939.39 KB | 1 年前3CakePHP Cookbook Documentation 5.x
com', 'port' => 587, 'username' => 'my@gmail.com', 'password' => 'secret', 'className' => 'Smtp', 'tls' => true, ], ], Transports can also be configured at runtime using TransportFactory::setConfig(): the ssl:// prefix in the host and configure the port value accordingly. You can also enable TLS SMTP using the tls option: use Cake\Mailer\TransportFactory; TransportFactory::setConfig('gmail', [ 'host' 'username' => 'my@gmail.com', 'password' => 'secret', 'className' => 'Smtp', 'tls' => true ]); The above configuration would enable TLS communication for email messages. To configure your mailer to use a specific0 码力 | 848 页 | 2.53 MB | 1 年前3CakePHP Cookbook 2.x
'username' => 'my@gmail.com', 'password' => 'secret', 'transport' => 'Smtp' ); } You can also use tls:// to prefer TLS for connection level encryption. Warning: You will need to have access for less secure apps To use either the ssl:// or tls:// feature, you will need to have the SSL configured in your PHP install. As of 2.3.0 you can also enable STARTTLS SMTP extension using the tls option: class EmailConfig 'secret', 'transport' => 'Smtp', 'tls' => true ); } The above configuration would enable STARTTLS communication for email messages. New in version 2.3: Support for TLS delivery was added in 2.3 Configurations0 码力 | 820 页 | 2.52 MB | 1 年前3CakePHP Cookbook 4.x
FormProtection instead for form tampering protection or HTTPS Enforcer Middleware to enforce use of HTTPS (TLS) for requests. class SecurityComponent(ComponentCollection $collection, array $config = []) The Security 'username' => 'my@gmail.com', 'password' => 'secret', 'className' => 'Smtp', 'tls' => true ] ], Transports can also be configured at runtime using TransportFactory::setConfig(): the ssl:// prefix in the host and configure the port value accordingly. You can also enable TLS SMTP using the tls option: use Cake\Mailer\TransportFactory; TransportFactory::setConfig('gmail', [ 'host'0 码力 | 1249 页 | 1.04 MB | 1 年前3CakePHP Cookbook 4.x
FormProtection instead for form tampering protection or HTTPS Enforcer Middleware to enforce use of HTTPS (TLS) for requests. class SecurityComponent(ComponentCollection $collection, array $config = []) The Security com', 'port' => 587, 'username' => 'my@gmail.com', 'password' => 'secret', 'className' => 'Smtp', 'tls' => true ] ], Transports can also be configured at runtime using TransportFactory::setConfig(): the ssl:// prefix in the host and configure the port value accordingly. You can also enable TLS SMTP using the tls option: use Cake\Mailer\TransportFactory; TransportFactory::setConfig('gmail', [ 'host'0 码力 | 967 页 | 2.88 MB | 1 年前3CakePHP Cookbook 3.x
the ssl:// prefix in the host and configure the port value accordingly. You can also enable TLS SMTP using the tls option: use Cake\Mailer\Email; use Cake\Mailer\TransportFactory; TransportFactory::setConfig('gmail' 'my@gmail.com', 'password' => 'secret', 'className' => 'Smtp', 'tls' => true ]); The above configuration would enable TLS communication for email messages. Warning You will need to have access 'smtp://my@gmail.com:secret@smtp.gmail.com:587?tls=true', ]); // Prior to 3.7.0 use Email::configTransport('default', [ 'url' => 'smtp://my@gmail.com:secret@smtp.gmail.com:587?tls=true', ]); When using a DSN string0 码力 | 1244 页 | 1.05 MB | 1 年前3CakePHP Cookbook 3.x
the ssl:// prefix in the host and configure the port value accordingly. You can also enable TLS SMTP using the tls option: use Cake\Mailer\Email; use Cake\Mailer\TransportFactory; TransportFactory::setConfig('gmail' 'username' => 'my@gmail.com', 'password' => 'secret', 'className' => 'Smtp', 'tls' => true ]); The above configuration would enable TLS communication for email messages. Warning: You will need to have access 'smtp://my@gmail.com:secret@smtp.gmail.com:587?tls=true', ]); // Prior to 3.7.0 use Email::configTransport('default', [ 'url' => 'smtp://my@gmail.com:secret@smtp.gmail.com:587?tls=true', ]); When using a DSN string0 码力 | 967 页 | 2.80 MB | 1 年前3
共 8 条
- 1