[英]how to get senders email Id in received mail from contact us form in yii2
[英]how to get mail from contact page yii2 advanced
我正在使用yii2 advance。 我希望聯系表單將電子郵件發送給管理員。 但是它不起作用應該怎么辦? 我嘗試了以下方式=>
'adminEmail' => 'admin@example.com', //wrote admin email id here
也改變
'useFileTransport' => false,
使它處於活動狀態的確切步驟是什么?
在您的config.php中,您還應該配置適當的傳輸方式,例如,可以使用的基於gmail帳戶的傳輸方式
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
.....
'useFileTransport' => false,//set this property to false to send mails to real email addresses
//comment the following array to send mail using php's mail function
//
//
/* configurazione servizio email da usare in locale (localhost sviluppo) */
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'smtp.gmail.com',
'username' => 'your_gmail_username@gmail.com',
'password' => 'your_gmail_password',
'port' => '587',
'encryption' => 'tls',
],
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.