Skip to Content
FeaturesEmail Notifications

Email Notifications

PicPeak sends automated emails for gallery lifecycle events using a queue-based processor with retry logic.

Email types

  • Gallery creation --- sent to the customer with the gallery link and optional password.
  • Expiration warning --- sent before a gallery expires.
  • Gallery link resend --- manually triggered from the admin panel or API.

SMTP configuration

Configure your SMTP provider in .env:

SMTP_HOST=smtp.gmail.com SMTP_PORT=587 SMTP_SECURE=false [email protected] SMTP_PASS=your-app-specific-password [email protected]

For Gmail, use an app-specific password . Regular account passwords will not work.

SendGrid example

SMTP_HOST=smtp.sendgrid.net SMTP_PORT=587 SMTP_SECURE=false SMTP_USER=apikey SMTP_PASS=your-sendgrid-api-key

Webhook transport instead of SMTP

PicPeak can hand every outgoing message to a webhook rather than sending it itself, which suits an n8n / Make / self-hosted relay setup.

It is configured in the environment, not in the admin interface:

VariableRequiredNotes
EMAIL_WEBHOOK_URLyeshttps:// only. Setting it switches the transport on.
EMAIL_WEBHOOK_SECRETyesWithout it the transport stays off and logs why.
EMAIL_FROMyesA webhook-only install has no SMTP row to take the sender from.
EMAIL_WEBHOOK_ALLOW_PRIVATE_URLSnoNeeded to target a private or container address, which is otherwise refused.

Each message is POSTed as JSON with from, to, cc, subject, html, text and attachments, where every attachment carries its filename, content type and base64 content. The raw body is signed with HMAC-SHA256 in the X-PicPeak-Signature header, the same scheme as gallery webhooks, so verify it the same way. Custom headers are not configurable.

Requests time out after 15 seconds, and any non-2xx response or transport error leaves the message in the queue to be retried. Attachments above 10 MB fail rather than being truncated. Send test email works and reports webhook-specific errors instead of SMTP advice.

Per-account SMTP hosts configured under Settings → Mail accounts keep sending over their own SMTP.

Multilingual templates

Email templates support multiple languages. PicPeak includes English and German templates out of the box. The template language is selected based on event or system settings.

Template editor

Edit email templates from the admin panel. The editor provides:

  • HTML template editing with variable placeholders.
  • Live preview of the rendered email.
  • Test email sending to verify formatting.

The email wrapper function (wrapEmailHtml()) in emailProcessor.js applies consistent styling and layout to all outgoing emails.

Email queue

Emails are processed through a queue with automatic retry on failure. Monitor the email queue status from the admin panel or by checking the backend logs:

docker compose logs backend | grep email

Logo in emails

Email logos use the FRONTEND_URL value to construct the image URL. Make sure this is set to your publicly accessible domain so email recipients can see images correctly.

If API_URL is set, it is used for email asset URLs. Otherwise it defaults to http://localhost:3001, which will result in broken images for external recipients.

Last updated on