I am currently looking for a way to send an email notification with WordPress website. So for example, when user visits page A, there’ll be an email notification sent in the background.
I haven’t got much experience with web development in WordPress environment, so can anyone give me a pointer here? Where should I start?
Thanks.
Edit:
I have tried both mail() & wp_mail() functions but none of them seemed to work for me. When I visited that page, no email got sent out. I’ve also checked the template for that page, which is just default template. Perhaps I was editing the wrong file??
Edit2:
I guess mail function probably hasn’t yet been enabled by the hosting provider.
Here’s a very basic piece of php code that sends an html email.
And I placed above code in header.php file, towards the bottom and it worked for me.
Thank you guys for all the suggestions and help.