Customize email notifications

Hello everyone,

I’m currently working on improving my website based on valuable user feedback. One of the major concerns I’ve received is that users are overwhelmed by the number of emails they receive, including listings and messages. To address this issue and prevent potential spam reports, I’m considering implementing customizable notification preferences.

Customizable notification preferences offer several benefits:

  1. Personalized Experience: Users can tailor their notifications to receive updates that are most relevant to them. This ensures they only receive information that matters, reducing distractions and improving their overall experience.
  2. Email Management: By allowing users to choose their preferred notification types, we empower them to declutter their inboxes. They can filter out less important notifications, enabling them to focus on messages and listings that require their immediate attention.
  3. Spam Prevention: Offering customization options helps us avoid our emails being reported as spam. When users have control over their notifications, they are less likely to perceive them as unwanted or intrusive.

To implement customizable notification preferences, I plan to incorporate a user settings section on the website. This section will allow users to easily modify their notification options, enabling them to toggle specific categories on or off based on their preferences. This way, we can strike a balance between keeping users informed and respecting their desire for a less cluttered inbox.

I would greatly appreciate any suggestions or feedback you may have regarding this idea. Your insights will be valuable in creating a seamless and user-centric notification system.

Also it would be nice if I could turn these off from the admin panel, like only allow cerain type of emails.

Thank you for your support and input!

Hi,

If you are familiar with coding, we can provide general guides.

To disable emails, you need to go to HivePress > Emails, overwrite the event, and leave the description blank, then this email event will be disabled How to customize emails - HivePress Help Center

Hi,

I am familiar with coding, looking forward to the guides.

Thank you for waiting. It is possible to add user settings by adding user attributes with the hook hivepress/v1/models/user/attributes

Then it is possible to use the hook hivepress/v1/emails/email where you can get the user model (email receiver) by email. It is possible to do this by getting the recipient parameter from the email array and then, with the query request, getting the user object from the database. The query example

$user = \HivePress\Models\User::query()->filter(
  [
    'email' => 'example@email.com'
  ]
)->get_first();

After getting the user object from the database, it is possible to get the value of the user settings in this way.

$user->display_attribute_field_name();

You can manage email content by adding conditions depending on the user settings value. For example, if you want to stop sending an email, then please make the body of the email empty in the hook hivepress/v1/emails/email in this way

$email['body'] = '';

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.