Showing
1 changed file
with
13 additions
and
14 deletions
| ... | @@ -45,25 +45,24 @@ class SendVerificationMessage implements ShouldQueue | ... | @@ -45,25 +45,24 @@ class SendVerificationMessage implements ShouldQueue |
| 45 | $redis->setex($this->email,1800,$code); //过期时间30分钟 | 45 | $redis->setex($this->email,1800,$code); //过期时间30分钟 |
| 46 | 46 | ||
| 47 | 47 | ||
| 48 | - $api = 'https://api.sendcloud.net/apiv2/mail/send'; | 48 | + $api = 'http://api.sendcloud.net/apiv2/mail/sendtemplate'; |
| 49 | $API_USER = 'mofunsky_noreply'; | 49 | $API_USER = 'mofunsky_noreply'; |
| 50 | $API_KEY = '8EkR0XnMuJn6V5yQ'; | 50 | $API_KEY = '8EkR0XnMuJn6V5yQ'; |
| 51 | - $from = 'noreply@mofunsky.com'; | 51 | + $from = 'noreply@yiyan.pub'; |
| 52 | - $vars = json_encode(array( | 52 | + |
| 53 | - "to" => array($this->email), | 53 | + $vars = json_encode( array("to" => array($this->email), |
| 54 | - "sub" => array( | 54 | + "sub" => array("%code%" => Array($code)) |
| 55 | - '%code%' => array($code), | 55 | + ) |
| 56 | - ), | 56 | + ); |
| 57 | - )); | ||
| 58 | $param = array( | 57 | $param = array( |
| 59 | - 'api_user' => $API_USER, // 使用api_user和api_key进行验证 | 58 | + 'apiUser' => $API_USER, // 使用api_user和api_key进行验证 |
| 60 | - 'api_key' => $API_KEY, | 59 | + 'apiKey' => $API_KEY, |
| 61 | 'from' => $from, // 发信人,用正确邮件地址替代 | 60 | 'from' => $from, // 发信人,用正确邮件地址替代 |
| 62 | - 'fromname' => 'Parlando', | 61 | + 'fromName' => 'Parlando', |
| 63 | - 'substitution_vars' => $vars, | 62 | + 'xsmtpapi' => $vars, |
| 64 | - 'template_invoke_name' => 'parlando_mail_verify', | 63 | + 'templateInvokeName' => 'parlando_mail_verify', |
| 65 | 'subject' => '[Parlando] Register Verify', | 64 | 'subject' => '[Parlando] Register Verify', |
| 66 | - 'resp_email_id' => 'true' | 65 | + 'respEmailId' => 'true' |
| 67 | ); | 66 | ); |
| 68 | 67 | ||
| 69 | $data = http_build_query($param); | 68 | $data = http_build_query($param); | ... | ... |
-
Please register or login to post a comment