Advertisement
gridphp

Sending email on certain condition

Jan 27th, 2014
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. $e["on_update"] = array("update_sport", null, true);
  2. $g->set_events($e);
  3.  
  4. function update_sport()
  5. {
  6. $id = $data["params"]["id"];
  7.  
  8. $Sport = $data["params"]["Sport"];
  9. if($Sport=="None")
  10. {
  11. require_once('/class.phpmailer.php');
  12. $mail = new PHPMailer();
  13. $mail->IsSMTP();
  14. $mail->AddCC('test@test.org');
  15.  
  16. $mail->Subject = "Test Transfer";
  17. $body = ("The sport has been changed. ");
  18. $mail->MsgHTML($body);
  19. $mail->AddCC($address);
  20. if(!$mail->Send())
  21. ;
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement