Plugin Page

VetCarePress – Veterinary Client Portal

View Plugin

Notifications

VetCarePress includes a notification system for email and SMS alerts to customers and staff, triggered automatically by system events or manually by staff.

Notification Types

TypeDescriptionTrigger
OTP codesOne-time password for customer loginCustomer requests login via the Customer Portal
Messaging alertsNew message notificationsStaff sends a message (to customer) or customer sends a message (to admin)
Medical record alertsRecord creation notificationsA new medical record is created for a patient
Vaccination remindersUpcoming or overdue vaccination alertsScheduled cron job or manual trigger
Custom notificationsStaff-initiated messagesStaff sends a notification from the dashboard

Architecture

The notification system follows a provider-based architecture:

  • NotificationService — Central dispatcher that routes notifications to the appropriate delivery provider.
  • EmailProvider — Sends notifications via wp_mail(). Works with any WordPress mail configuration or SMTP plugin.
  • TwilioProvider — Sends SMS notifications via the Twilio API.
  • VonageProvider — Sends SMS notifications via the Vonage (formerly Nexmo) API.

Notification Logging

All notifications are logged in the wp_vcp_notification_log custom database table. Each log entry records:

  • Delivery channel (email or SMS)
  • Destination (email address or phone number)
  • Message content
  • Delivery status (sent or failed)
  • Error details (if delivery failed)

See Notification Log for details on viewing and using the log.

Delivery Channels

Email

Email delivery uses the WordPress wp_mail() function and requires no additional VetCarePress-specific configuration. It works out of the box with your existing WordPress mail setup.

See Email Setup for configuration details.

SMS

SMS delivery is optional and requires a Twilio or Vonage account. All features that use SMS also support email as a fallback.

See SMS Setup for provider configuration instructions.

Template Configuration

Notification templates are configurable in the following settings areas:

  • Settings > Notifications — Messaging and medical record notification templates (subject, body, email footer).
  • Settings > Vaccination — Vaccination reminder templates.

See also: Email Setup, SMS Setup, Notification Log

Email Setup

VetCarePress uses WordPress’s built-in wp_mail() function for all email delivery. No additional plugin-specific configuration is required for basic email to work — it operates with whatever mail configuration your WordPress installation already has.

While wp_mail() works by default using PHP’s mail() function, this method is unreliable on many hosting environments. For consistent delivery, use an SMTP plugin:

  • WP Mail SMTP — Popular option with support for multiple providers.
  • FluentSMTP — Lightweight alternative with a clean interface.
  • Any other plugin that hooks into wp_mail().

Email Sender Identity

VetCarePress uses the clinic information from Settings > General for the email sender:

SettingKeyUsed As
Clinic Namevcp_clinic_nameEmail "From" name
Clinic Emailvcp_clinic_emailEmail "From" address

Ensure these fields are filled in to avoid emails being sent with generic WordPress defaults.

HTML Formatting

All emails sent by VetCarePress are HTML-formatted with inline CSS styling. The primary color defined in your VetCarePress settings is used for branding elements such as headers and buttons, ensuring visual consistency with your clinic’s identity.

Email Templates

Email templates are configurable in Settings > Notifications. Each template includes a Subject field and a Body field.

Messaging Templates

TemplatePurpose
General message notificationSent to customers when staff sends a general (non-patient-specific) message
Patient-specific message notificationSent to customers when staff sends a message linked to a specific patient
Admin notificationSent to clinic admin when a customer sends a new message

Medical Record Templates

TemplatePurpose
Record creation notificationSent to customers when a new medical record is created for their pet

Vaccination Reminder Templates

Vaccination reminder email templates are configured separately in Settings > Vaccination. These templates are used by the automated reminder system.

A global footer text is appended to all outgoing emails. This can be customized in Settings > Notifications under the vcp_email_footer setting. The default value is:

"This is an automated message."

Use this field to include disclaimers, contact information, or unsubscribe instructions as required by your jurisdiction.


See also: Notifications Overview, SMS Setup, Notification Log

SMS Setup

SMS notifications in VetCarePress are optional. All features that support SMS also work with email only. If you do not need SMS delivery, you can skip this configuration entirely.

VetCarePress supports two SMS providers: Twilio and Vonage (formerly Nexmo). Configuration is done in Settings > SMS.

Twilio Setup

Step 1: Create a Twilio Account

Sign up at twilio.com and complete the account verification process.

Step 2: Obtain Credentials

From the Twilio Console dashboard, note the following:

  • Account SID — Your unique account identifier.
  • Auth Token — Your secret authentication token.

Step 3: Get a Phone Number or Messaging Service

You need either:

  • A Twilio phone number capable of sending SMS, or
  • A Messaging Service SID (for higher volume or multi-number sending).

Step 4: Configure in VetCarePress

  1. Navigate to Settings > SMS.
  2. Select Twilio as the SMS provider.
  3. Enter your Account SID and Auth Token.
  4. Choose the From Type:
From TypeConfiguration
Phone NumberEnter the Twilio phone number (e.g., +1234567890)
Messaging ServiceEnter the Messaging Service SID

Step 5: Test

Use the Send Test SMS button to send a test message and verify the configuration.

Vonage Setup

Step 1: Create a Vonage Account

Sign up at the Vonage website and complete registration.

Step 2: Obtain Credentials

From the Vonage dashboard, note the following:

  • API Key
  • API Secret

Step 3: Configure in VetCarePress

  1. Navigate to Settings > SMS.
  2. Select Vonage as the SMS provider.
  3. Enter your API Key and API Secret.
  4. Enter the From number or alphanumeric sender name.

Step 4: Test

Use the Send Test SMS button to verify delivery.

SMS Templates

SMS message templates are not configured in the SMS settings tab. Instead, they are managed within the settings for each feature that uses SMS:

  • Messaging notifications — Settings > Notifications
  • Medical record notifications — Settings > Notifications
  • Vaccination reminders — Settings > Vaccination

SMS Character Limit

When composing messages that will be sent via SMS, staff members see a character counter with a warning when the message exceeds the standard SMS threshold of 160 characters. Messages exceeding this limit may be split into multiple SMS segments by the provider, which can increase delivery costs.

Cost Considerations

SMS delivery incurs per-message charges from your chosen provider (Twilio or Vonage). VetCarePress does not charge separately for SMS functionality. Review your provider’s pricing to understand costs based on your expected message volume and destination countries.


See also: Notifications Overview, Email Setup, Notification Log

Notification Log

The Notification Log provides a complete audit trail of all notifications sent by VetCarePress, including both successful deliveries and failures.

Accessing the Log

  • Navigate to WP-Admin > VetCarePress > Notification Log.
  • Requires the vcp_manage_notifications capability.

Log Display

Notifications are listed in reverse chronological order (newest first), with pagination at 30 entries per page.

Columns

ColumnDescription
DateTimestamp of when the notification was sent
ChannelDelivery channel — email or sms
DestinationThe recipient’s email address or phone number
CustomerThe customer the notification was sent to
StatusDelivery status — sent or failed
Error MessageError details if the notification failed

Database Storage

Log entries are stored in the wp_vcp_notification_log custom database table. Each record contains the following fields:

FieldDescription
customer_idThe customer associated with the notification
channelDelivery channel (email or sms)
destinationEmail address or phone number
messageThe notification content
statusDelivery result (sent or failed)
error_messageHuman-readable error description (if failed)
provider_responseRaw response from the delivery provider (if failed)
created_atTimestamp of the notification attempt

Common Use Cases

The notification log is useful for:

  • Verifying OTP delivery — Confirm that login codes were sent to customers who report not receiving them.
  • Debugging SMS failures — Identify delivery issues by reviewing error messages and provider responses.
  • Auditing notification history — Review what notifications were sent to a specific customer and when.
  • Checking vaccination reminders — Verify that scheduled vaccination reminders were successfully delivered.

Failed Notifications

When a notification fails, the log entry includes:

  • A human-readable error message describing what went wrong.
  • The raw provider response from the email or SMS provider, which is useful for technical debugging.

Common failure causes include:

  • Invalid phone number format for SMS delivery.
  • SMS provider credentials expired or incorrect.
  • Email delivery rejected by the recipient’s mail server.
  • Rate limits exceeded on the SMS provider account.

Data Retention

Log entries are not automatically cleaned up. They persist indefinitely for audit and debugging purposes. If your log grows large, entries can be managed directly in the database via the wp_vcp_notification_log table.


See also: Notifications Overview, Email Setup, SMS Setup