Support

Home Forums Event Espresso Premium Code for sending confirmation mail to all registrants

Code for sending confirmation mail to all registrants

Posted: February 7, 2020 at 4:21 am


Fakta Kurser

February 7, 2020 at 4:21 am

I can’t seem to find the right code for sending out the confirmation email to all registrants.
I’m creating 3 different emails:
1. For admin
2. For the primary registrant [PRIMARY_REGISTRANT_EMAIL]
3. Every registrant in the order made by the primary registrant

I’ve tried: [RECIPIENT_EMAIL]
but here the mail only goes out to one of the registrants, namely the primary registrant who also gets the mail for [PRIMARY_REGISTRANT_EMAIL]

So which code should I use in order for the confirmation mail to reach every registrant?


Tony

  • Support Staff

February 7, 2020 at 6:15 am

Hi there,

[RECIPIENT_EMAIL] is correct.

As you referenced the ‘confirmation email’ I’m assuming you are referring to the ‘Registration Approved’ message template.

If you want an email sent to each registrant you want to edit the ‘Registrant’ context.

Event Espresso -> Messages -> Default message templates -> Registration Approved -> Edit Registrant.

The ‘To’ field should be [RECIPIENT_EMAIL] and the toggle switch at the top should be green, indicating that context is active.

(Note that this is the Event Espresso default setup for this message type already)

The Primary Registrant is still a registrant and will receive the registrant context, the ‘Primary Registrant’ context should only be used for additional email containing further information or as the sole email sent rather than an email for each registrant.

How are you collecting the additional registrant details on the registration form?

Is there an event I can run a test registration on to view the setup?


Fakta Kurser

February 7, 2020 at 7:31 am

This reply has been marked as private.


Tony

  • Support Staff

February 10, 2020 at 3:21 am

Thank you. Your event setup looks fine.

With the above, which ‘context’ (see HERE) are you editing on the message type?

On the ‘Registration Approved’ message type there are 3:

Event Admin
Primary Registrant
Registrant

The Event Admin obviously just goes to the the admin.

Primary Registrant should be used for messages that you want to go to the Primary Registrant.

The Registrant context is looped over for each registrant in the group and the templates is used to generate a message for each individual registrant (which is what you want).

It could be that you have the ‘Primary Registrant’ context active, but the ‘Registrant’ context de-activated.

(Note the above is all based on the default behaviour, if you’ve changed the templates at all you may have changed this)

Can you post a screenshot of your Registration Approved message type listed in Event Espresso -> Messages -> Default message templates.

Like this – https://monosnap.com/file/ZEWztw1uWaf4AdRt7yfhTKCurKo8bk?idx=13&total=24&canMove=true

The important part is that ‘Registrant’ is not grey and looks like the screenshot.

Click on the ‘Edit Registrant’ link and post a screenshot that page, please.

The top of the page above the fold is fine, I just need to see the page header and the ‘to’ and ‘from’ fields.


Fakta Kurser

February 10, 2020 at 3:40 am

This reply has been marked as private.


Tony

  • Support Staff

February 10, 2020 at 3:55 am

Thank you.

So I just tested a group registration with 3 tickets the messages sent as expected:

https://monosnap.com/file/zZTglo86ujL9XzJQvbJfl8NoXHVzev

3 Registrant emails (as there is a total of 3, 1 Primary and 2 additional)
1 Primary Registrant email

Note if you are using the same details for each registration on checkout EE tries to reduce the number of emails and so it will simply send 1 registrant as they are all exactly the same.


Fakta Kurser

February 13, 2020 at 7:29 am

This reply has been marked as private.


Tony

  • Support Staff

February 13, 2020 at 8:39 am

I just tested this again and for a group of 4 tickets, I’m getting 5 emails.

4 x the registrant email
1 x the primary registrant email

Here – https://monosnap.com/file/sf9fYMWSdngAdfLn8UL6Iwy7nEr0Ru

You’ll obviously get the Event Admin email and so far this appears to be working as expected.

If you go to Event Espresso -> Messages -> Message activity, can you see the messages there?

I’m not sure what you would be doing differently to get a missing email, but as a registrant (and also the primary registrant) I’m getting all of the expected emails from your site.


Fakta Kurser

February 13, 2020 at 11:57 pm

This reply has been marked as private.


Tony

  • Support Staff

February 14, 2020 at 2:20 am

So the emails showing in Message activity log means that EE is correctly triggering and ‘sending’ those emails.

When EE sends an email what it does is build out the content in the messaging system and then to send it passes them to wp_mail() which basically checks for various headers and tries to confirm the email is set up as it should be before passing it off to your server to do whatever you server is set up to do with emails. wp_mail() will either return true if sending was complete or false if not (with no additional details).

All of that means that if the email shows as sent in EE, then wp_mail() didn’t return false and the email ‘sent’. If it then hasn’t actually been received then the issue is outside of Event Espresso and usually means either the sending mail server (unlikely in this case) or the receiving mail server has marked the email as spam. I know you mentioned that the email hasn’t shown in spam but the mail server itself determines what it does with those emails and it could simply be dropping them rather than passing them to your spam mailbox.

There are 1001 reasons mail servers can flag an email as spam randing from the content of the email (EE uses HTML emails which may well be flagged by the mail server for the domain) to the IP address of the sending server.

When users run into deliverability issues like this we recommend switching to a transaction email server:

https://eventespresso.com/wiki/postmark-app-mandrill-transactional-email-handling-services/

Using one of the above services fixes the issue 99% of the time.

You must be logged in to reply to this support post. Sign In or Register for an Account

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: publish

Updated by  Tony 2 days, 18 hours ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!