• Сообщество
  • Блог
Документация
Плагины и интеграцииВсе расширения для Medusa от сообществаЭкспертыПодберите специалиста для разработки и развития вашего проекта на Medusa
КейсыПосмотрите примеры Medusa в продакшене и успешные внедрения
Меч Moscow
Комплексная e-commerce платформа на Medusa для московского fashion-бренда

Меч Moscow · Fashion

Нужна помощь в разработке плагина интеграции для Medusa?

Написать намНайти плагины

Gorgo снижает затраты на адаптацию Medusa к локальным рынкам.

Мы разрабатываем плагины интеграции, осуществляем поддержку и развиваем сообщество разработчиков на Medusa в Telegram.

  • Ресурсы Medusa
  • Плагины и интеграции
  • Эксперты
  • Кейсы
  • Medusa Чат в Telegram
  • Medusa Новости в Telegram
  • Документация Gorgo
  • Связаться с нами
  • TelegramGitHub
Плагины
N

Notification postal

Postal notification provider for Medusa

Нужна доработка этого плагина?

Связаться с нами
npm install @uhlhosting/medusa-notification-postal
Категория
Другое
Создано
Uhlhosting
Версия
0.1.4
Последнее обновление
11 часов назад
Ежемесячные загрузки
Загрузка данных
Звезды на Github
0
npmNPMGitHubGithub

@uhlhosting/medusa-notification-postal

Postal notification provider for Medusa, combining SendGrid-style provider robustness with Resend-style option validation and template-friendly usage.

Release

  • Current package version:
  • License:
  • Changelog:

Options

  • - one of , , (default )
  • - default sender e-mail address

options

  • - Postal base URL, for example
  • - Postal server API key used in

options

  • - Postal SMTP host
  • - SMTP port, default
  • - for TLS, default
  • - connection timeout in ms, default

options

  • - Postal SMTP host
  • - SMTP port, default
  • - for TLS, default
  • - SMTP username
  • - SMTP password
  • - connection timeout in ms, default

Usage

Add to under the notification module providers.

1{
2 resolve: "@medusajs/medusa/notification",
3 options: {
4 providers: [
5 {
6 resolve: "@uhlhosting/medusa-notification-postal",
7 id: "postal",
8 options: {
9 channels: ["email"],
10 auth_type: process.env.POSTAL_AUTH_TYPE || "smtp-api",
11 from: process.env.POSTAL_FROM,
12
13 // smtp-api
14 base_url: process.env.POSTAL_BASE_URL,
15 api_key: process.env.POSTAL_API_KEY,
16
17 // smtp and smtp-ip
18 smtp_host: process.env.POSTAL_SMTP_HOST,
19 smtp_port: Number(process.env.POSTAL_SMTP_PORT || 25),
20 smtp_secure: process.env.POSTAL_SMTP_SECURE === "true",
21 smtp_user: process.env.POSTAL_SMTP_USER,
22 smtp_pass: process.env.POSTAL_SMTP_PASS,
23 },
24 },
25 ],
26 },
27}

Workflow tracking

Use Medusa notification workflows and pass workflow metadata in :

1await notificationModuleService.createNotifications({
2 channel: "email",
3 to: "customer@example.com",
4 template: "order-placed",
5 provider_id: "postal",
6 content: {
7 subject: "Order confirmation",
8 html: "<p>Thanks for your order</p>",
9 text: "Thanks for your order",
10 },
11 provider_data: {
12 workflow_event: "order.placed",
13 workflow_run_id: "wf_run_123",
14 },
15})

The provider logs and for traceability in Medusa runtime logs.

Programmatic Workflows

You can trigger a direct email notification through the Postal provider programmatically using the . This ensures the mail goes through the provider's standard channel and logs full delivery metadata.

1import { sendPostalEmailWorkflow } from "@uhlhosting/medusa-notification-postal"
2
3const { result } = await sendPostalEmailWorkflow(req.scope).run({
4 input: {
5 to: "customer@example.com",
6 from: "custom-sender@example.com", // Optional, defaults to POSTAL_FROM
7 template: "custom-template-id", // Optional
8 provider_data: {
9 subject: "Test Programmatic Email",
10 html: "<p>Hello, this is a test email sent programmatically.</p>",
11 text: "Hello, this is a test email sent programmatically.",
12 cc: "copy@example.com",
13 workflow_event: "admin.test_send",
14 workflow_run_id: "wf_run_manual_123"
15 }
16 }
17})
18
19// Result returns the delivery info:
20// { success: true, delivery: { message_id: "123", ... } }

Еще в этой категории

Посмотреть все
Другое
Gati logo

Gati

От Devx Commerce

Синхронизируйте Medusa с Gati ERP

Загрузка данных
npm
Другое
Product Reviews logo

Product Reviews

От Lambda Curry

Добавляйте рейтинги, отзывы и модерацию товаров

Загрузка данных
GitHubnpm
Другое
Variant Images logo

Variant Images

От Betanoir

Организуйте и загружайте варианты изображений в Medusa

Загрузка данных
GitHubnpm