• Resolved jbx

    (@jbx)


    Is there a way to customise the ‘from’ email address used by the Restaurant Reservation plugin?

    For some reason it uses the admin email from wordpress, which is typically used as a destination (notification of updates, new users etc.) not originator. In my case this is a completely different domain (a gmail account of the tech admin/webmaster), while people who book a table at a restaurant need to receive it from an [email protected]

    From the Notification settings I can see there is a reply-to address, but setting this doesn’t change the from address. Is there a way to fix this?

    https://ww.wp.xz.cn/plugins/restaurant-reservations/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi jbx,

    I’ve set it this way to ensure wider compatibility with different server environments. Many email servers restrict the From email address they’ll use when sending email, and the email in WordPress settings tends to be the most reliable.

    I’ve written a tiny addon to override this if you want to do so.

    To use it, click the Download Gist button on the top right, open the file in a text editor, and change the email address on this line to whatever you’d like. Then save the file, upload it to your /wp-content/plugins/ directory and activate it from the Plugins menu.

    Thread Starter jbx

    (@jbx)

    Thanks. I presume I can just paste that in my theme’s functions.php file instead of having another plugin? Its anyway specific to my site (the email is hardcoded) and I could actually get that from a field I make configurable in the Theme options.

    Sure, if you’d prefer. It won’t be any faster than using a plugin. Just make sure you remember to port the code over if you switch themes in a couple years! 🙂

    Thread Starter jbx

    (@jbx)

    Yes. Its just that I want it to be configurable and making it configurable through my theme’s options makes functions.php the best place to have it.

    Tried it out, seems to be working fine.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Customise from email’ is closed to new replies.