账号注册成功后,发送的激活邮件是,欢迎邮件,不是账号激活邮件,如下:
需要配置激活: https://github.com/fecshop/yii2_fecshop/blob/master/services/email/Customer.php#L30
/** * 注册账户是否需要邮件激活 */ public $registerAccountIsNeedEnableByEmail = false;
可以在配置文件中配置这个变量
@common/config/fecshop_local_services/Email.php
return [ 'email' => [ 'childService' => [ 'customer' => [ 'registerAccountIsNeedEnableByEmail' => true, ], ], 'mailerConfig' => [ // 默认通用配置 'default' => [ 'class' => 'yii\swiftmailer\Mailer', 'transport' => [ 'class' => 'Swift_SmtpTransport', 'host' => 'smtp.qq.com', //SMTP Host 'username' => '2420577683@qq.com', //SMTP 账号 'password' => 'dshagrytvnwjeabb', //SMTP 密码 'port' => '587', //SMTP 端口 'encryption' => 'tls', ], 'messageConfig'=> [ 'charset'=> 'UTF-8', ], ], ], ], ];
文档已经更新:http://www.fecshop.com/topic/1912
成功了,之前是邮件模板有问题