Commit Graph

26 Commits

Author SHA1 Message Date
85767a68ef chore(email): stop admin notifications for registrations and activations
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
- Remove _send_registration_notification call on registration
- Remove first-activation admin notification on password reset
- Change MAIL_BCC default from maciej.pienczyn@inpi.pl to empty

Admin can still set MAIL_BCC via env if blanket BCC is desired.
All new member and password-reset info is visible in /admin panel.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 14:40:19 +02:00
5030b71beb chore: update Author to Maciej Pienczyn, InPi sp. z o.o. across all files
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 08:20:47 +02:00
73abb76c9e refactor(email): remove dead Graph API/Azure/MSAL code — SMTP only
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
EmailService now uses SMTP (OVH Zimbra) exclusively. Removed msal/requests
imports, MSAL_AVAILABLE guard, _get_access_token(), Azure credential fields
(tenant_id, client_id, client_secret, authority, scope, graph_endpoint),
Graph API send_mail() body, and Azure-based init_email_service() logic.
__init__ now takes only mail_from; init_email_service() checks SMTP_USER only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 15:03:52 +02:00
6b586911a1 refactor(email): SMTP is now primary for ALL domains, Graph API is legacy fallback only
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-30 13:22:05 +02:00
44031dd031 fix(email): init email service with SMTP-only when Azure credentials missing
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-30 13:16:53 +02:00
63f87ee951 fix(email): remove undefined sender_name references in SMTP fallback
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-30 12:40:27 +02:00
933e062196 feat(email): SMTP fallback via OVH Zimbra + direct SMTP for @nordabiznes.pl
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Domain nordabiznes.pl removed from M365 (moved to OVH Zimbra).
Graph API can no longer send as @nordabiznes.pl.

- Added _send_via_smtp() method using SMTP_HOST/SMTP_USER/SMTP_PASSWORD
- @nordabiznes.pl sender goes directly to SMTP (skips Graph API)
- Other domains still try Graph API first, SMTP as fallback
- .env updated with OVH Zimbra SMTP credentials

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 12:37:27 +02:00
39f1d33f44 fix: replace CSS gradients with solid colors in email templates
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Email clients (Gmail, Outlook, Apple Mail) don't support CSS
linear-gradient(), causing white text on white background — company
name, header title, and CTA button were invisible.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 10:24:06 +01:00
8f37ef4ded feat: distinguish admin-initiated password reset emails
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Admin-sent reset emails now say "Administrator portalu wygenerował
link do ustawienia hasła" instead of generic "zażądano resetowania".
Validity period shown correctly: 24h for admin, 1h for self-service.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 11:08:41 +01:00
0214cc70f2 fix: password reset token used utcnow vs now, extend admin reset to 24h
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
The admin reset-password endpoint used datetime.utcnow() while the
validation used datetime.now(), causing tokens to appear expired
immediately on CET servers. Changed to datetime.now() and extended
admin-initiated resets to 24 hours validity.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 11:07:17 +01:00
d64447627a feat(email): add branded message notification email builder 2026-03-11 17:28:50 +01:00
625e7a1112 fix: add explicit instructions for expired activation link in welcome email
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 10:16:30 +01:00
9e06335f1a fix: use solid background-color for email CTA buttons
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
linear-gradient not supported in many email clients (Outlook, Apple Mail),
causing white text on transparent background = invisible buttons.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 10:13:42 +01:00
fac832c80c feat: welcome activation email for users who never logged in
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
New email template with friendly tone and green CTA button for first-time
account activation. Script with --dry-run, --test-email, --user-id flags
and 72h token validity.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 10:03:29 +01:00
902ff58d54 fix: correct Facebook URL + side-by-side events layout + FB in footer
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
- Updated Facebook link from /nordabiznes to /profile.php?id=100057396041901
  across all 4 locations (email templates, JSON-LD schema)
- Added Facebook link to site footer (Contact section)
- Added "Follow us on Facebook" to landing page CTA
- Redesigned upcoming events: side-by-side layout instead of stacked

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 19:14:09 +01:00
f9bd941d19 fix: add compass logo PNG for emails (SVG converted to 128x128 PNG)
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Previous logo-circle.png was 404, favicon-192 was wrong icon.
Generated logo-email.png from favicon.svg compass via sharp.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 18:33:38 +01:00
c14cd9db38 fix: use existing favicon-192.png for email logo (logo-circle.png was 404)
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 18:30:13 +01:00
9b0a0bea56 improve: unified v3 email design across all templates
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Shared _email_v3_wrap() helper: branded header with logo, full footer
with address/links. Updated: password reset, welcome, forum reply,
role notification. Action buttons grid layout in /admin/users.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 18:14:45 +01:00
e2ae68eeed feat: add BCC support to email service — admin copy of every email
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Every email sent via send_email() now includes a BCC to the portal
administrator (MAIL_BCC env var, defaults to maciej.pienczyn@inpi.pl).
Recipients who are already in TO are automatically excluded from BCC.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:36:02 +01:00
cebe52f303 refactor: Rebranding i aktualizacja modelu AI
- Zmiana nazwy: "Norda Biznes Hub" → "Norda Biznes Partner"
- Aktualizacja modelu AI: Gemini 2.0 Flash → Gemini 3 Flash
- Zachowano historyczne odniesienia w timeline i dokumentacji

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:08:39 +01:00
abded75fb0 fix: Add fallback background-color for email headers
Outlook and some email clients don't render CSS gradients properly.
Added solid background-color (#1e3a8a) as fallback before gradient.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 12:27:35 +01:00
8c9d95cca9 refactor: Update tagline from "Katalog Firm Członkowskich" to "Platforma Networkingu"
Changed branding across the application:
- email_service.py: Updated footers in password reset and welcome emails
- base.html: Updated meta description and footer text
- landing.html: Updated page title

New tagline: "Platforma Networkingu Regionalnej Izby Przedsiębiorców Norda Biznes"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 11:35:58 +01:00
fdeb9ffd19 fix: Polish diacritics and header contrast in email templates
- Added proper Polish characters (ą, ę, ó, ł, ś, ć, ż, ź, ń)
- Improved header contrast with darker gradient and text-shadow
- Added meta charset UTF-8 for proper encoding
- Fixed warning box text color for better readability

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 11:15:38 +01:00
c1874b73e6 fix: Change email sender display name to "Norda Biznes Hub"
Previously showed "InPi Notifications" which was confusing.
Now emails will display as "Norda Biznes Hub <noreply@inpi.pl>"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 09:46:26 +01:00
a09203ef55 feat: Add email logging and monitoring system
- Add EmailLog model to database.py for tracking sent emails
- Modify email_service.py to log all sent emails to database
- Track email type (welcome, password_reset, notification)
- Record sender, recipient, subject, status, timestamps
- Supports monitoring email delivery success/failure

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 09:26:48 +01:00
02fc67bf40 Initial commit 2026-01-01 14:01:49 +01:00