Customization in Forminator's Email Notifications

I’m using “Easy Property Listings” plugin for the property listing on pages, all the listing have a common Form embedded.

Now depending on the Post(Listing of the house) it should choose the appropriate agent(Post Author) as a recipient and send an email.

  • Predrag Dubajic
    • Support

    Hi Brad,

    We have forwarded this request to our developers to check out “Easy Property Listings” further and see how could this be done.

    Please note that this is a custom coding request so if it’s too complex to develop it you might need to hire a developer to help you further.

    I see in the chat notes that there’s also a question about Recipients and how it works.

    When you click to add new recipient the default thing it searches for is if there are Form fields that can be used to get the email address from.

    It will not show you a list of users until you start typing their username or email.

    Best regards,

    Predrag

  • Alessandro
    • Staff

    Hi there, thanks for using Forminator,

    We created a fix for you, so your authors receive the email for properties they posted.

    You can add the above snippet in a mu-plugin. If you are not familiar with mu-plugins, you can read more about them here:

    https://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    You can download you plugin here:

    https://gist.github.com/wpmudev-sls/ce692035e4eb0efbdb551ad1a37929df

    Do not forget that the author is being appended to the recipients list.

    If you want to limit the email only to the author change the line

    $recipients[] = get_the_author_meta( 'user_email', get_post_field( 'post_author', $listing_id ) );

    with that line

    $recipients = array( get_the_author_meta( 'user_email', get_post_field( 'post_author', $listing_id ) ) );

    By clicking Download ZIP on the upright part, then unzip and upload it to your mu-plugins directory.

    As we do comprehensive tests on our code, sometime we may miss something, if so, report it to assist you further.

    Hope this helps!

    Kind regards!

  • Brad
    • Flash Drive

    Alessandro,

    Thanks! This is fantastic service and I appreciate your help!

    I installed the wpmudev-forminator-listing-author.php file to my mu-plugins folder. The folder already existed, I assume it is added by WPMU Dev Hosting?

    I then sent a form submission from this page: https://halenhomes.staging.wpmudev.host/property/n49-w15302-orchid-circle/, which should have sent the email to the user at ekelbel@halenhomes.com, but unfortunately, she did not receive it.

    I have the Forminator form set to email info@halenhomes.com as well, and if the plugin was working correctly, it should email both, correct? Can you help me troubleshoot this? I will enable support access.

    Thanks,

    Brad

  • Adam Czajczyk
    • Support Gorilla

    Hi Brad

    I checked the form and no, with current configuration you should only receive message at info@halenhomes.com.

    In “Email Notifications” configuration you only have “confirmation” message enabled and that’s fine. But in “recipients” field there you have a fixed e-mail address set. Confirmation mail would go to that e-mail and if you want it to also go to the address submitted by user (so e.g. to my e-mail if I submit the form) you need to add a relevant form field placeholder there.

    I’ve already did that for you (take a look how it’s set – I just selected “E-mail” field in that option) and tested the form and I received confirmation mail now to my inbox.

    Please note: I’d strongly recommend setting up some SMTP server for the site since we don’t provide full-featured e-mail transport on WPMU DEV hosting (apart from transactional e-mails, within reasonable limits):

    https://premium.wpmudev.org/docs/hosting/emails/#email-sending-policies-and-limits

    Best regards,

    Adam

  • Brad
    • Flash Drive

    Hi Adam,

    Sorry – I think you may have misunderstood the objective of the mu-plugin Alessandro posted. I need the form to be automatically sent to the Author of the post (in this case, the Property). This way I can use the same form on these template pages and have the form always go to the associated Listing Agent.

    I believe that is what Alessandro’s plugin is supposed to do. He said above…

    Do not forget that the author is being appended to the recipients list.

    …but after installing the mu-plugin (by copying the php file to that folder – is that is all there is to it?), the form did not send to the author, only to info@halenhomes.com.

    Thanks,

    Brad

  • Adam Czajczyk
    • Support Gorilla

    Hi Brad

    Sorry – I think you may have misunderstood the objective of the mu-plugin Alessandro posted.

    Actually, it’s worse than that. I… missed entire plugin! i mean, I wrote your post about mails not being sent and didn’t check previous posts in this thread. I guess I must have been a bit too tired but that’s not an excuse, it should never ever happened! I’m really sorry and thank you for pointing that out.

    i’ve read entire thread now and also looked at the plugin’s code. I’m sure that Alessandro tested it before sharing it with you but probably on his own test site so there’s a chance that there’s something “interfering” here and some slight modification in the code might be necessary.

    I’ve just messaged him about it, asking to take another look. It would be good if he could do this on your staging site though. Since the support access to the staging site is open, please make sure that it stays open until this is solved (it’s time valid so might expire on its own). Alessandro might also need to access files on site in such case so will that be okay for you if he creates himself SFTP account (temporary only) for the staging site?

    Best regards,

    Adam

    • Alessandro
      • Staff

      Good morning Brad,

      I apologize for my late response.

      I would like to contact our support team staff providing the details for accessing staging site (password protected), as it requires username/password which I can not get, as I do not have access to your website’s admin panel and hub.

      Then, I can get logged in via the support access you extended. It should be resolved in few minutes.

      Best regards,

      Alex.

  • Adam Czajczyk
    • Support Gorilla

    Hi Brad

    Just a little “follow up” to Alex post above:

    You’ve been testing it on staging site so we only need access to staging and the support access is open there so that’s fine. Since it’s on our hosting we can actually create a temporary SFTP account if you agree (we’ll remove it after Alex is done with the work of course!) so if that’s fine with you, he’ll proceed.

    I’m sorry for confusion, we’ve had it marked in our internal system for the production site as that’s the one that’s been discussed during the chat and is assigned to this ticket.

    Best regards,

    Adam

  • Brad
    • Flash Drive

    Adam and Alessandro,

    Sorry – I must have opened the ticket under the production site. Yes, please access staging and sFTP as needed. Password for the staging site is

    U: ****** (removed by staff)

    P: ****** (removed by staff)

    Thanks,

    Brad

  • Alessandro
    • Staff

    Hello Brad,

    Hopefully managed to resolve your issue.

    I realized, that you have the following settings in your form, Email Notifications > Admin Email > Off. :sweat_smile:

    As long as, listings authors, are receiving the “Admin Email”, you should toggle this option to ON. If you want, your only authors to receive the email, then leave “Recipients” field empty, while you keep the setting ON.

    If you want to receive, both of you, and/or anyone else, then add more email addresses (Recipients field) and you will get, each of you, a notification when a user submits the form.

    In both cases, use the snippet provided, with no changes at all.

    (Already described how to include or not extra email address).

    Hope this helps.

    Best regards,

    Alex.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.