Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Franky

    (@liedekef)

    You can use the existing hooks for events here:
    https://www.e-dynamics.be/wordpress/?cat=41
    and code up any action you want.
    Some people even integrated EME with mailchimp via a RSS feed, and others created a hook that creates a post for each new event. Look for those in the forum at https://www.e-dynamics.be/bbpress

    Hey kingcasper13,

    Did you ever find a solution for this? I have the same requirement (to be able to send an email to a list when a new event is created).

    Thanks,
    Brian

    Plugin Author Franky

    (@liedekef)

    Hi Brian,

    is the hook for eme_insert_event_action not enough? It gives you the event info and you can use any php mailing tool you like then.

    Hi Franky,

    Yes, that is awesome.. Just wondering if anyone had done the work already. If not, I can write my own – no problem.

    Thanks again for this great plugin!

    Brian

    Hi Brian,

    Can you write down your workflow? I want also send a mail to all users when a event is created.

    Thanks!
    Niels

    Hi Niels,

    Sorry, I ended up not implementing this.

    Thanks,
    Brian

    Plugin Author Franky

    (@liedekef)

    Although I will not support it, I can help with a basic eme_insert_event_action example. Add this to your functions.php and change the $subject_format and $body_format to your liking, using the available event placeholders mentioned at https://www.e-dynamics.be/wordpress/?cat=25 ):

    add_action('eme_insert_event_action','eme_mail_event');
    function eme_mail_event ($event) {
       $contact_email = $contact->user_email;
       $contact_name = $contact->display_name;
       $subject_format="This is the new event called ' #_EVENTNAME '";
       $body_format="This is the new event called ' #_EVENTNAME '";
    
       $subject=eme_replace_placeholders($subject_format, $event, "text");
       $body=eme_replace_placeholders($body_format, $event, "text");
       $blogusers = get_users();
       foreach ( $blogusers as $user ) {
          eme_send_mail($subject,$body, $user->email, $user->display_name, $contact_email, $contact_name);
       }
    }

    Many thanks!
    I will play with it, hopefully I will get some useful stuff out of it:)

    Niels

    Plugin Author Franky

    (@liedekef)

    Small correction, I added it as an example on the hooks and filters page:
    https://www.e-dynamics.be/wordpress/?cat=41

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Send out email when new event is created?’ is closed to new replies.