Have you ever wondered how to send a notification of user logged in in WordPress? With a free plugin we are going to use it's super simple to set it up with your own custom content.
Install Notification plugin
We are using the Notification plugin that is the best option on the market to send any alerts in WordPress. The user logged in notification is one of its featured.
All you need to do is to install the plugin in your WordPress admin. Just search for the "Notification" plugin, install it and make it active.
Add new Notification
The freshly installed plugin adds a new menu item in WordPress admin. You can add your new notifiation via this menu just like you'd create new post.
The title of notiifcation is not meant to be send anywhere, it's just displayed in the Notifications table for you so you could distinguish one alert from another.
Select your trigger
The trigger is an action upon which the email is sent. This is where you can select user logged in to send an email you want.
Each trigger has his own set of the Merge Tags. These are simple bits of dynamic content that are replaced upon the submission with the actual values. Using them you can make your message looking very nice and crafted for the particular scenario. See how the Merge Tags works.
Set the Subject line
You can provide the subject using any Merge Tags you like.
Write the email body
In the body, you can write anything you want using any valid Merge Tag. The message is going to be sent as HTML so you can format your text freely and use the active links.
Set up the recipients
The recipients section is a simple list of static emails, WordPress users, Merge Tags, Roles or Administrator. You can define as much of the recipients as you need.
Save the email notification
Save your Notification in the upper right section clicking "Save" button.
Now, you are ready to test your email!
You can also add more different alerts for other scenarios and for other recipients.