git的push邮件简单通知钩子
http://www.myluoluo.com/?p=3535 password != 'hiu1234bb76794435ton50obotfwq78') {exit('error pwd!');}$mailbody = $jsonobj->push_data->user_name.提交了新的代码
.项目名称:.$jsonobj->push_data->repository->name.
.'项目首页:push_data->repository->homepage.'>'.$jsonobj->push_data->repository->homepage.'
'.提交时间:.$jsonobj->push_data->commits[0]->timestamp.'
push_data->commits%5b0%5d->url.'>'.$jsonobj->push_data->commits[0]->url.'';include(class.phpmailer.php);$mail= new phpmailer();$mail->issmtp();$mail->smtpauth = true;$mail->smtpsecure = ssl;$mail->host = smtp.qq.com;$mail->port = 465;$mail->charset = utf-8;$mail->username = admin@myluoluo.com;$mail->password = xxxxxx;$mail->from = admin@myluoluo.com;$mail->fromname = 海棠姐姐;$mail->subject = 一个新的push;$mail->body = $mailbody;$mail->ishtml(true);$mail->addaddress(admin@myluoluo.com, 海棠姐姐);$mail->addaddress(o@moe.re, 傻逼o);if(!$mail->send()) {echo mailer error: . $mail->errorinfo;} else {echo message sent!;}?>
复制代码