Email notification after an event is added #664
Replies: 8 comments 5 replies
-
Does EME mail work in normal cases? Also: the value for $contact_email in your example is being used as from and reply-to, so you need to make sure your mailserver allows this as a From-address. |
Beta Was this translation helpful? Give feedback.
-
Also: what EME version are you using? |
Beta Was this translation helpful? Give feedback.
-
no answer, closing discussion. |
Beta Was this translation helpful? Give feedback.
-
sorry, why do you close this discussion? |
Beta Was this translation helpful? Give feedback.
-
should I open another thread with this issue or can it be opened once more? |
Beta Was this translation helpful? Give feedback.
-
EME Version 2.5.4 |
Beta Was this translation helpful? Give feedback.
-
I can send testemails with EME, it first says "The e-mail has been sent.", and then I receive the testemail. |
Beta Was this translation helpful? Give feedback.
-
ok, so i will migrate the frontend submit plugin settings now the new eme version in my backend ... and then I will give it another try |
Beta Was this translation helpful? Give feedback.
-
Hi,
How can I achieve, that I get an email notification after an event is added?
Is that possible with some configuration? I didn´t find any.
So I referred to https://www.e-dynamics.be/wordpress/category/documentation/12-hooks-and-filters/
and inserted into the themes functions.php the following code:
add_action('eme_insert_event_action','eme_mail_event');
function eme_mail_event ($event) {
$contact = eme_get_event_contact ($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->user_email, $user->display_name, $contact_email, $contact_name);
}
}
but unfortunately I don´t receive an email …
May the theme be the problem? Does the theme have to provide something?
Best regards and thank you,
Markus
Beta Was this translation helpful? Give feedback.
All reactions