Editing Email Templates

Customizing Email Templates

Fixly sends automated emails for bookings, status updates, and customer communications. These templates are built using Laravel Blade and can be customized by editing the files directly on your server.

1. Where to Find Email Templates

All email layouts are stored in the resources/views/emails directory. Below is a list of the most common templates:

  • Booking Confirmation: Sent to the customer when a repair is scheduled.
    • resources/views/emails/booking-confirmation.blade.php
  • Status Updates: Sent when a technician changes the status of a repair (e.g., "Ready for Pickup").
    • resources/views/emails/status-updated.blade.php
  • New Internal Note: Sent when a technician adds a note to a booking.
    • resources/views/emails/note-added.blade.php
  • Welcome Email: Sent to new customers when they register an account.
    • resources/views/emails/welcome-new-customer.blade.php
  • Support Ticket Notifications: Sent when a new message is received in a support ticket.
    • resources/views/emails/new_message.blade.php

2. Using Dynamic Content

Emails use "variables" to pull data from your database (like customer names or ticket numbers). When editing, you must keep these tags intact for the data to display:

  • Customer Name: {{ $booking->customer_name }} or {{ $user->name }}
  • Order/Ticket ID: {{ $booking->id }}
  • Device Details: {{ $booking->device_model }}
  • Tracking Link: <a href="{{ route('repair.track', $booking->id) }}">View Status</a>

3. Branding and Styling

Email clients (like Gmail or Outlook) have limited support for modern CSS. To ensure your emails look good everywhere:

  • Inline Styles: Avoid using external stylesheets. Apply styles directly to HTML tags, such as <td style="color: #2563eb; font-weight: bold;">.
  • Images: If you add a logo, use an absolute URL (e.g., https://yourdomain.com/images/logo.png) rather than a local file path.
  • Colors: You can manually change hex codes in the templates to match the Primary Brand Color you set in the Admin Settings.

4. Configuring SMTP Settings

For these templates to be sent, you must configure your mail server credentials:

  1. Log in to the Admin Panel.
  2. Navigate to System Settings > System Configuration.
  3. Click the Email tab.
  4. Enter your SMTP Host, Port, Username, and Password.
  5. Click Save Changes.

5. Testing Your Changes

After modifying a template, the best way to test it is to perform the action in the app (e.g., create a dummy booking or update a repair status). If you do not see the changes immediately, clear your view cache:

php artisan view:clear