• Resolved kimdebling

    (@kimdebling)


    I have EM set up to auto-accept events that are submitted via the front end.

    The email from the settings to tell the owners an event is submitted is getting through (so I understand that the email settings are fine) but the confirmation email ‘your event is live’ to the submitter is not happening.

    The anonymous events are attributed to a ‘guest’ account I made, but the submitter emails are stored within the post correctly.

    Any ideas how to fix this or what to check?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    are you using the latest EM version and could it be it was in the email spam folder?

    Thread Starter kimdebling

    (@kimdebling)

    Hi, sorry for the late response – I thought I’d turned on email notifications for this thread.

    Yes, I’m using the latest EM, and have checked my spam. The comment notifications are going to the email associated with the ‘guest submitter’ account rather than the email address of the submitter.

    I’ve checked wp-mail works, and have set it to use smtp with no change to this problem!

    Thread Starter kimdebling

    (@kimdebling)

    I’ve narrowed it down a little bit – in events-manager/em-emails.php it is skipping everything and going straight to

    } elseif (!current_user_can('manage_options')) {

    This makes sense because all users (including anonymous users) can submit an event, which immediately gets approved. Right now the code only sends admins an email at that point, rather than to the anonymous submitter.

    Thread Starter kimdebling

    (@kimdebling)

    I’ve modified the last section of em-emails.php to the following:

    } elseif (!current_user_can('manage_options')) {
                if ($EM_Event->is_published() && !$EM_Event->get_previous_status()) {
    
                    $subject = $EM_Event->output(get_option('dbem_event_published_email_subject'), 'raw');
                    $body    = $EM_Event->output(get_option('dbem_event_approved_email_body'), $output_type);
                    $EM_Event->email_send($subject, $body, $EM_Event->get_contact()->user_email);
    
                    $admin_emails = explode(',', str_replace(' ', '', get_option('dbem_event_submitted_email_admin'))); //admin emails are in an array, single or multiple
                    if (empty($admin_emails))
                        return true;
                    $subject = $EM_Event->output(get_option('dbem_event_published_email_subject'), 'raw');
                    $body    = $EM_Event->output(get_option('dbem_event_published_email_body'), $output_type);
                    $EM_Event->email_send($subject, $body, $admin_emails);
                }
            }
        }
        return $result;
    }
    add_filter('em_event_save', 'em_event_submission_emails', 10, 2);

    -This only really suits the setup of this particular site but it seems to work. Can anyone see any glaring issues with this? Please let me know if so and if I don’t hear I’ll mark this as resolved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Anonymous event submitted emails not getting sent.’ is closed to new replies.