• Hi Nate. I’m testing the notifications of the plugin, and I found that when I edit a reservation to make a change on it (status, date, time, wathever), and marked the “send notification” checkbock, the email is not sent to the person who did the reservation (which is me, to my Gmail account).

    Have in mind that the first email saying that I’ve made a reservation, and the first response about it (beign confirming it or closing it), are being sent and received perfectly. The issue seems to be on the “edit” window and marking the “send notification” checkbox.

    I saw that you already had some questions about this issue, and it seemed that most of the times the problems comes from the server side. So before posting this message, I contacted to my hosting provider, they looked into it, they saw that there were some emails trying to be sent from a sendmail php function, so they recommend me to use a plugin to configure a SMTP server to send all the mails sent from WordPress, which may help with this.

    I did that, but nothing changed. The emails are not sent.

    Is there anything else I can do about it? Some other testing perhaps so I can help you to identify the issue? Or maybe something else I can ask the hosting provider?

    This function is mandatory for us, so It’s in my best interest to help you help me!

    Thanks a lot!

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter nchiari

    (@nchiari)

    PS: the function to send an email with a custom message works fine too

    Thread Starter nchiari

    (@nchiari)

    So I tried to send another email from the edit window by checking the “send notification” box, only changing the time of the reservation (the status stills on Confirmed), and took a look at the log of the emails sent on the plugin Mail Bank, and there was no action recorded, no email sent, not even an attempt to send it.

    So it seems that the issue may be in the php files, like the function to send the email when checking that box may be missing perhaps?

    • This reply was modified 7 years, 4 months ago by nchiari.
    • This reply was modified 7 years, 4 months ago by nchiari.

    Hi!

    I have also had some problems. My problems ended when I used an email address from within the domain under Settings / General / email. Perhaps you are using the gmail address there?

    Have a nice day!

    Best regards, Niclas

    Thread Starter nchiari

    (@nchiari)

    Thanks viche for your response!

    I’m using the same email address there that the one I’m using to send emails for the reservations. The thing is that some emails are sent perfectly, but the ones that are supposed to be sent when I edit something of the reservation and I check the box to send the notification are not.

    The hosting provider sent me a log of the email account from today so I can have a better look for what’s going in and out of it, and it’s clear that there were no attempt to send any emails at the times I tested to edit and send a notification. So it seems that this is not a server issue, but a plugin or a configuration issue.

    Thanks again!

    • This reply was modified 7 years, 4 months ago by nchiari.
    • This reply was modified 7 years, 4 months ago by nchiari.

    For your information,

    It works for me to change to confirmed or closed and then send. But no email is sent when set to pending.

    But the Custom message is not added to the email.

    Thread Starter nchiari

    (@nchiari)

    In my case, it doesn’t works on any status, neither changing it and then send it. I tried all the possibilities, but haven’t got any luck ??

    Hi @nchiari,

    Checking that box doesn’t ensure an email is sent. An email will only be sent when the checkbox is checked and the status is changed in a way that triggers one of the email notifications. These are:

    – A new booking sends the New Booking email.
    – Changing from Pending to Confirmed sends the Confirmed email.
    – Changing from Pending to Closed sends the Rejected email.

    Changing from Confirmed to Closed or any other status transition will not trigger an email, and just changing details like the date or time will not trigger an email. In such cases, if the customer needs to be made aware of the change, you’ll need to use the Send Message option.

    If you feel you’ve done one of the actions above that is expected to trigger an email, but it wasn’t received, you’ll need to contact your web host with the date and time of that email that’s gone missing.

    Your web host can check their logs to determine if an email was sent. If it wasn’t, they should be able to say why. If it was sent, they may have received a notice from the recipient server which indicates why the email was blocked.

    I had the same issue stated here. After configuring the SMTP (WP SMTP), all the notification worked fine.

    Thread Starter nchiari

    (@nchiari)

    Hello Nate, thanks for your response.

    I understand now. Is there any easy way to tweak the plugin files to program it to send a notification email every time I do any kind of action without having to use the Send Message feature? That’ll be great, because sometimes when you’re with too much work and you need to make a change on the fly, you may forget to send the message to let the customer know about it.

    Thanks a lot!

    Hi @nchiari,

    You’ll need to write a small custom plugin to hook in and do this. If this sounds like something you want to do, you’ll need to be familiar with the WordPress hooks API (actions and filters).

    You can hook into the rtb_update_booking action any time a booking is changed:

    https://github.com/NateWr/restaurant-reservations/blob/master/includes/Booking.class.php#L171

    And here’s an example of how a notification is sent:

    https://github.com/NateWr/restaurant-reservations/blob/master/includes/Notifications.class.php#L172-L177

    And here’s the class for the notification object used above:

    https://github.com/NateWr/restaurant-reservations/blob/master/includes/Notification.Email.class.php

    In particular, you’ll need to set the message property manually, since the notification won’t know which template to use. Here’s how the notification sets a template:

    https://github.com/NateWr/restaurant-reservations/blob/master/includes/Notification.Email.class.php#L168-L202

    Beware that doing this you will likely end up with duplicate emails being sent, as the old confirmation/rejection emails could be triggered along with your generic email. So you may need to perform some logic on the post_status to prevent this from happening.

    Thread Starter nchiari

    (@nchiari)

    Thanks again Nate! I’ll have a look and see if I can do this.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Email notifications are not sent’ is closed to new replies.