Home › Forums › Ticket Products › Event Tickets Plus › Add Mail-To to Tickets RSVP email
- This topic has 7 replies, 2 voices, and was last updated 10 years, 3 months ago by
Geoff B..
-
AuthorPosts
-
January 5, 2016 at 10:30 pm #1050886
Hugh Todd
ParticipantBecause I can’t see a forum for Tickets, I’m posting here, trusting that the answer will apply to both.
The site I’m managing does not have any (real) domain emails, because the government organisation that owns the site has its own email domain.
However, since people receiving RSVP tickets may want to correspond further with the office, and because replying to the email’s sending address will not lead anywhere, I’d like to include a ‘Reply-To’ in the header.
Changing the site’s wp_mail parameters via a filter overrides other wp_mail settings, including those set up within the Tickets plugin. In particular, html formatting gets lost. I’m a bit tentative about adding this back in (in $header), in case it breaks something else — like WordPress’s password retrieval, where the reset link can go missing.
So, I’ve found RSVP.php in the event-tickets/src/Tribe folder. Modifying line 345 works, adding the Reply-To to the $headers array:
$headers = apply_filters( 'tribe_rsvp_email_headers', array( 'Content-type: text/html', 'Reply-To: Recipient <[email protected]>' ) );This is obviously not good practice. It’ll break next time the plugin is updated.
Is there a better, more long term way I can achieve this?
January 6, 2016 at 10:48 pm #1051611Geoff B.
MemberGood morning Hugh and welcome back!
You are absolutely right, modifying the rsvp.php file in the plugin directly is not the best practice and this will cause your changes to be overwritten at every upgrade.
But we have some good news for you.
You can actually create customization directly in your WordPress template by following our Themer’s guide.
Check out the Events Tickets section more specifically.In short, the rsvp.php contained in your theme’s folder will have precedence over the plugin’s rsvp.php .
Alternatively, you might consider using a plugin to override the basic wp_mail parameters and give you much better reliability (IMOH).
I personally use the Easy WP SMTP plugin a lot, maybe you will like it to.Let me know if that answers your questions and happy customizing!
Geoff B.
January 6, 2016 at 11:08 pm #1051621Hugh Todd
ParticipantAh. Thanks, Geoff.
I did have a look at the Themers’ Guide, but wasn’t sure whether it applied to more than just the /event-tickets/src/views/ directory.
So if I put my modified RSVP.php file in my_theme/tribe-events/tickets/Tribe/ directory it will be found?
I only ask because the Guide refers to templates in the /views/ directory, which isn’t replicated in the custom directory — which makes me think that the plugin looks only for modified /views/ directory files in the user’s custom directory.
There are two rsvp php files, you see. The one in /event-tickets/src/views/tickets/rsvp.php (which is referred to in the Guide, but is not the one I need to modify), and the one I do need to modify which is in /event-tickets/src/Tribe/RSVP.php (uppercase RSVP).
January 7, 2016 at 11:04 pm #1052290Geoff B.
MemberGood evening Hugh,
That is an excellent point and you are right, these 2 files do not serve the same purpose.
Let me just verify something with our Dev team on that very topic and I’ll get right back to you.
In the meantime, out of curiosity, would using a mailing plugin such as the one recommended help you out ?
Have an awesome day!
Geoff B.
January 8, 2016 at 3:22 am #1052334Hugh Todd
ParticipantThanks, Geoff.
In answer to your question, your suggestion is helpful, but I’m baulking a little at setting up another email address, not using either the site’s domain or the client’s. With a bit more effort, I may be able to find an email provider that can handle domain emails, for which I can maybe pass the cost on to the client, though I try to avoid ongoing costs of this sort. Or even a free provider, if such exists and can be trusted sufficiently.
In short, having a fix to wp_mail would be a more elegant fix!
January 9, 2016 at 10:56 am #1053225Geoff B.
MemberGood afternoon Dave,
Thank you for your answer.
Upon verification, you are absolutely right. Template customizations only apply to views. My apologies.
A custom filter or modifying the core plugin (which is not recommended) seem to be the only ways to accomplish exactly what you are looking for.
As previously stated, although not ideal, using the plugin to hand over wp_mail functions to the smtp email address of your choice and perhaps adding a strong call to action in the template itself (email.php) could be used as a solution.
I wish I could provide you with a more complete solution, but it does look that these are the best options available for now.
You might also want to suggest this as a feature for upcoming releases in our User voice forum.
Is there anything else I can help you with ?
Have a wonderful weekend,
Geoff B.
January 12, 2016 at 3:22 pm #1054891Hugh Todd
ParticipantThanks, Geoff.
I’ll suggest a feature: a GUI option to add a ‘Mail-To’, or at the very least an override of the same sort as those in the ‘view’ directory.
-Hugh
January 13, 2016 at 12:02 am #1055004Geoff B.
MemberThese sound like great suggestions Hugh.
Thank you so much for your input and have a fantastic day!
Geoff B.
-
AuthorPosts
- The topic ‘Add Mail-To to Tickets RSVP email’ is closed to new replies.
