• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

Need help on Wp_mail

Nosamax

New member
Feb 13, 2021
22
3
3
Hello to all,
I hope everyone is well.

I come here because I try to set up a trigger that sends me an email each time a visitor visits one of my pages, I know I risk getting spammed but I'm ok with that.

Or if you know a plugin that can do this; I also had the idea of triggering WP statistics reports on each page view to have a more complete rendering my only requirement is to use wp_mail()

I use this code in functions.php :

function wpse_email_me_every_visit() {
wp_mail( '[email protected]', 'There is a visitor !', 'Someone is on the site, get ready !' );
}

add_action( 'wp', 'wpse_email_me_every_visit' );

EDIT : I forgot to specify lol : my code doesn't allow to trigger an email at each page loading and I don't understand why, I receive the notification only when the user clicks on a link or fill the form

Thanks in advance for your help
 
Good day
I have no idea what you want a notification for each visit.
But there is free simple way to do that.

Use the Tawk chat system.
It is a 100% free chat that rings on your computer or phone each time someone visits a site...
You can see the visitor navigation )links pages etc) + you can offer support live (if online).

Maybe this helps.
Cheers.
NoBs
 
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock