Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('em_event_save','custom_event_save',1,2);
- function custom_event_save($result,$EM_Event){
- global $EM_Mailer;
- if( !is_object($EM_Mailer) ){
- $EM_Mailer = new EM_Mailer();
- }
- $subject = "New event: ".$EM_Event->event_name;
- $body = $EM_Event->post_content;
- $email = "admin@gmail.com"; //add email address
- $attachments = array();
- $args = array();
- if( !$EM_Mailer->send($subject,$body,$email, $attachments, $args) ){
- //email is not send, you can add notification
- }
- return $result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement