๐Ÿ“ง FindYourJobNow โ€” Email Templates

Source: conversionmediagroup/findyourjobnow ยท src/findyourjobnow/templates/emails/

โš ๏ธ Note: These are Django templates with {% templatetag %} syntax. Variables like {{title}}, {{body}}, {{url}} are filled at send time. Images reference {{SITE_URL}}/static/ so logos won't render here. The alert emails also use coldmail.app as the actual sending service (not SES directly).

Templates Found


Sending Paths

basic.html

emails/basic.html โ†’ extends base.html
HTML
Used by: common/emails.py โ†’ basic_email() ยท Variables: {{title}} {{body}} {{url}} {{url_title}} {{unsub_link}} ยท Sent via: SES (X-SES-CONFIGURATION-SET: FYJN)

basic_alert.html

emails/basic_alert.html โ†’ extends base.html (uses richtext filter)
HTML
Used by: alerts/tasks.py โ†’ send_alert_mail() via ColdMail API ยท Variables: {{body|richtext}} {{url}} {{url_title}} {{unsub_link}} ยท Note: Body uses |richtext filter (Wagtail) โ€” supports HTML in body content. Alert templates are stored in DB (EmailAlertsTemplate model) and rendered at send time.

basic.txt

emails/basic.txt โ€” plain text fallback for all emails
TXT
Welcome to Find Your Job Now!

Thanks for signing up. We have thousands of job listings waiting for you.
Click below to start your job search today.

https://findyourjobnow.com/search?keyword=Sales&zip=10006
Template: {{title}}\n\n{{body}}\n\n{{url}} โ€” Used as the plain text alternative in all emails

base.html

emails/base.html โ€” layout wrapper
LAYOUT
<!-- Base email layout structure -->

1. Preheader text (hidden, for email client preview)
2. Centered table (max 600px)
3. Logo area:
   - LIGHT mode: fyjn_email_logo_light.png (default)
   - DARK mode: fyjn_email_logo_dark.png (via CSS @media prefers-color-scheme)
4. {% block email_body %} โ€” child template content goes here
5. Footer (from footer.html)

Dark mode support:
  - Apple Mail: uses <style> @media (prefers-color-scheme: dark)
  - Gmail: uses u + .body filter for brightness inversion

Font: "Pangram" (custom, loaded from /static/fonts/), fallback: Helvetica, Arial, sans-serif
Logos: static/icons/base/fyjn_email_logo_light.png + fyjn_email_logo_dark.png ยท Extended by: basic.html, basic_alert.html

header.html

emails/header.html โ€” <head> with all CSS
LAYOUT
Contains:
  - Viewport meta tags
  - x-apple-disable-message-reformatting
  - color-scheme: light dark
  - Custom font @font-face (Pangram Bold + Regular from /static/fonts/)
  - Full CSS reset for email clients
  - Button styles (.button, .button--green, .button--red)
  - Dark mode overrides (@media prefers-color-scheme: dark)
    โ†’ body bg โ†’ #333, text โ†’ #FFF
    โ†’ .attributes_content bg โ†’ #222
  - MSO (Outlook) fallback font: Arial
  - Responsive: @media max-width 600px โ†’ full width tables

Total: ~350 lines of CSS
Included by: base.html via {% include "emails/header.html" %}

๐Ÿ“ก Sending Architecture

How emails actually get sent
Two sending paths:

1. SES Direct (common/emails.py)
   โ””โ”€ basic_email() / alert_email()
   โ””โ”€ Uses Django's EmailMultiAlternatives
   โ””โ”€ Header: X-SES-CONFIGURATION-SET: FYJN
   โ””โ”€ FROM: settings.DEFAULT_FROM_EMAIL
   โ””โ”€ For: Transactional (signup, password reset, etc.)

2. ColdMail API (alerts/tasks.py โ†’ cold_mail_send_service.py)
   โ””โ”€ https://my.coldmail.app/api/v1
   โ””โ”€ Mailbox pool with round-robin rotation
   โ””โ”€ Pixel tracking via ColdMail
   โ””โ”€ For: Drip campaigns, job alerts, re-engagement
   โ””โ”€ Templates stored in DB: EmailAlertsTemplate model
   โ””โ”€ Scheduling: AdminAlertSchedule โ†’ Celery tasks
   โ””โ”€ Stagger: 1.2s per email + random 0.1-0.4s jitter

Email alert flow:
  Celery beat โ†’ check_admin_alerts_schedule()
    โ†’ validate_schedule() (checks day-of-week, date range)
    โ†’ get_users_or_leads() (filters by edu status, source, etc.)
    โ†’ broadcast_email() (fans out with stagger)
      โ†’ process_and_send_email()
        โ†’ get_email_template() (picks next template in flow, respects repeat limit)
        โ†’ send_alert_mail()
          โ†’ render basic_alert.html with template body
          โ†’ send_email_via_coldmail()

Models:
  - EmailAlertsTemplate: subject + body_template (Django template syntax)
  - EmailAlertsTemplatesFlow: ordered sequence per schedule
  - AdminAlertSchedule: frequency, target audience, date range
  - AdminAlertLogs: sent/opened tracking per recipient