Community코딩 & 개발github.com

Taldres/laravel-waitlist

taldres/laravel-waitlist 통합에 필요한 이중 옵트인 확인 메일, 환경설정 페이지 링크, 환영 메일, 출시 메일, 뉴스레터를 올바른 수신 거부 링크, 원클릭 헤더 및 프로젝트별 발신자와 함께 동의한 사용자에게 전송합니다.

laravel-waitlist란 무엇인가요?

이 스킬은 `taldres/laravel-waitlist` 패키지를 사용하는 애플리케이션에서 대기자 명단에 등록된 사용자에게 메일을 전송하거나 메일 제공자를 설정해야 할 때 사용됩니다. Laravel 애플리케이션에서 이 패키지가 제공하는 이벤트 리스너를 통해 대기자 명단 가입 확인(이중 옵트인), 환경설정 페이지 링크, 환영 메일, 출시 메일, 뉴스레터 등 모든 유형의 메일을 안전하고 정확하게 전송합니다. 각 메일은 큐를 통해 비동기적으로 전송되며, 페이로드에 포함된 토큰을 보호하기 위해 암호화됩니다. 또한 `ShouldBeEncrypted`와 `ShouldQueue` 인터페이스를 구현하여 보안성과 성능을 보장합니다. `ManageLinkRequested` 이벤트를 통해 환경설정 페이지 링크를 전송하고, `recipients()` 메서드를 통해 출시 메일과 뉴스레터를 전송하며, RFC 8058 원클릭 수신 거부 헤더를 지원합니다. 여러 프로젝트를 운영하는 경우 각 프로젝트별 발신자와 메일러를 설정할 수 있으며, 모든 메일에는 적절한 수신 거부 링크가 포함됩니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Taldres/laravel-waitlist/tree/HEAD/resources/boost/skills/laravel-waitlist-mail

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Laravel Waitlist: 메일

애플리케이션이 taldres/laravel-waitlist를 사용 중이며 대기자 목록의 사람들에게 메일을 보내거나 메일 제공업체를 설정해야 할 때 이 스킬을 사용합니다.

주요 목표

  • 모든 메일은 대기열에 포함되고 암호화된 리스너를 통해 전송되며, 목적에 맞는 링크를 포함하고, 동의가 유효한 주소에만 도달해야 합니다.

워크플로우

1. 어떤 메일이 언제 발송되어야 하는지 파악합니다

이 패키지는 메일을 보내지 않으며 제공업체를 호출하지 않습니다. 이벤트를 발생시키고, 앱의 리스너가 Laravel 메일러(Resend, Postmark, SES, SMTP 등)를 통해 전송합니다.

메일발송 시점포함해야 하는 항목
확인 (이중 옵트인)EntrySubscribed (단, $event->requiresConfirmation이 true)$event->confirmUrl, $event->unsubscribeUrl
환경설정 페이지 링크ManageLinkRequested$event->manageUrl, $event->entry->email로만 전송
환영 (선택 사항)EntryConfirmed$event->unsubscribeUrl, Waitlist::listUnsubscribeHeaders($event->entry)
특정 목록에 대한 출시 또는 업데이트앱이 결정목록에서 탈퇴할 수 있는 수신자별 링크
뉴스레터 (선택적 목적)앱이 결정뉴스레터만 구독 취소할 수 있는 수신자별 링크

2. 확인 리스너

namespace App\Listeners;

use App\Mail\ConfirmWaitlistMail;
use Illuminate\Contracts\Queue\ShouldBeEncrypted;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Support\Facades\Mail;
use LogicException;
use Taldres\Waitlist\Events\EntrySubscribed;
use Taldres\Waitlist\Facades\Waitlist;

class SendWaitlistConfirmationMail implements ShouldQueue, ShouldBeEncrypted
{
    public function handle(EntrySubscribed $event): void
    {
        if (! $event->requiresConfirmation) {
            return;
        }

        $confirmUrl = $event->confirmUrl ?? throw new LogicException('urls()에서 확인 페이지를 설정하거나 패키지 라우트를 활성화하세요.');

        Mail::to($event->entry->email)->send(new ConfirmWaitlistMail(
            $confirmUrl,
            $event->unsubscribeUrl,
            $event->subscription->consents->pluck('text')->all(), // 확인되는 내용
        ));

        Waitlist::confirmationMailed($event->subscription, 'confirm-mail@2026-10');
    }
}
  • 동일한 이벤트는 재전송도 전달합니다($event->isNewCycle === false). 리스너에서 제한하지 마십시오. 패키지의 쿨다운 및 한도가 이미 처리했습니다.
  • confirmationMailed()는 동의 옆에 메일의 참조를 기록합니다. 템플릿 이름과 버전을 사용하고 각 버전의 텍스트를 유지하십시오.
  • 프로젝트의 urls()가 confirm 페이지를 설정하지 않고 패키지 라우트가 꺼져 있는 동안 $event->confirmUrl은 null입니다. 빌드할 수 없는 링크(라우트가 켜져 있지만 등록되지 않은 경우, 예: 오래된 라우트 캐시 이후)는 InvalidConfigurationException을 발생시키고 가입 또는 확인을 취소합니다. 아무것도 커밋되지 않으므로 이벤트가 발생하지 않고 메일도 발송되지 않습니다.

3. 환경설정 페이지 링크 리스너

use Taldres\Waitlist\Events\ManageLinkRequested;

class SendManageLinkMail implements ShouldQueue, ShouldBeEncrypted
{
    public function handle(ManageLinkRequested $event): void
    {
        Mail::to($event->entry->email)->send(new ManageLinkMail($event->manageUrl, $event->expiresAt));
    }
}

링크는 waitlist.manage.token_ttl 분(60분) 후에 만료됩니다. 메일에 이 내용을 명시하십시오.

4. 출시 메일 및 뉴스레터: recipients() 사용

use Taldres\Waitlist\Support\Recipient;

// 하나의 목록, 기본 목적: 링크는 해당 목록에서 탈퇴
Waitlist::for('beta')->recipients()->each(
    fn (Recipient $recipient) => Mail::to($recipient->email)->locale($recipient->locale)->queue(new LaunchMail($recipient)),
);

// 선택적 목적, 프로젝트 전체, 주소당 한 번: 링크는 해당 목적만 구독 취소
Waitlist::recipients('newsletter')->each(
    fn (Recipient $recipient) => Mail::to($recipient->email)->locale($recipient->locale)->queue(new NewsletterMail($recipient)),
);

Mailable에서 수신자의 링크를 사용하십시오:

use Illuminate\Mail\Mailables\Headers;

public function __construct(public Recipient $recipient) {}

public function headers(): Headers
{
    return new Headers(text: $this->recipient->listUnsubscribeHeaders()); // RFC 8058 원클릭
}

// content: $this->recipient->unsubscribeUrl()

Recipient에는 entry, email, purpose, locale (동의 언어 또는 null) 및 leavesList가 있습니다. 대기열에 있는 Mailable은 주소와 토큰 링크를 전달합니다. 이들도 ShouldBeEncrypted를 구현하도록 하십시오. 원클릭 헤더는 패키지 라우트와 https APP_URL이 필요합니다. 라우트가 없으면 비어 있습니다.

5. 이벤트 외부의 링크

Waitlist::unsubscribeUrl($entry);                // 목록에서 탈퇴
Waitlist::unsubscribeUrl($entry, 'newsletter');  // 뉴스레터만 구독 취소
Waitlist::listUnsubscribeHeaders($entry, 'newsletter');

6. 여러 프로젝트

프로젝트는 $event->entry->project (또는 $recipient->entry->project)입니다. 발신자와 메일러를 여기에서 선택하십시오:

// config/products.php (앱 자체): ['rocket' => ['name' => 'Rocket', 'from' => '[email protected]', 'mailer' => 'resend'], ...]
$product = config("products.{$event->entry->project}");

$mail = (new ConfirmWaitlistMail(...))->from($product['from'], $product['name']);
Mail::mailer($product['mailer'])->to($event->entry->email)->send($mail);

메일 링크는 이미 각 프로젝트의 자체 페이지(urls())를 가리킵니다.

규칙, 참조 및 템플릿

  • 메일을 보내는 모든 리스너는 ShouldQueue (새 주소와 기존 주소에 대해 동일한 응답 시간) 및 ShouldBeEncrypted (페이로드에 토큰이 포함됨, EntryForgotten에는 주소가 포함됨)를 구현해야 합니다.
  • Laravel은 app/Listeners의 리스너를 handle() 유형 힌트로 자동 발견합니다. Event::listen()으로 다시 등록하면 각 메일이 두 번 전송됩니다.
  • 이벤트는 커밋 후에 전달됩니다. 전달된 이벤트가 메일이 발송되었음을 증명하지 않으므로 실패한 작업을 모니터링하십시오.
  • 메일 드라이버 설정: https://laravel.com/docs/mail; SPF, DKIM 및 DMARC가 있는 도메인에서 전송하십시오.
  • 전체 가이드: https://github.com/Taldres/laravel-waitlist/blob/main/docs/mail.md

예시

  • "Resend로 이중 옵트인 메일 보내기": composer require resend/resend-php, MAIL_MAILER=resend, RESEND_KEY=..., 그런 다음 2단계의 리스너를 사용하십시오.
  • "베타 목록의 모든 사람에게 출시 이메일 보내기": 4단계에서 Waitlist::for('beta')->recipients()를 사용하십시오.
  • "월간 뉴스레터 보내기": Waitlist::recipients('newsletter'), 수신자별 원클릭 헤더.

안티 패턴

  • 동의 확인 없이 WaitlistEntry::all() 또는 Waitlist::for($list)->entries()로 메일 보내기; recipients() 또는 whereConsentedTo($purpose)를 사용하십시오.
  • 일반 메일에 Waitlist::manageLink($entry) 또는 관리 URL을 넣는 경우; 이는 개인 데이터를 노출하며 메일이 전달될 수 있습니다.
  • 관리 링크를 $event->entry->email이 아닌 다른 곳으로 보내거나 요청에 대해 답변하는 경우.
  • 전체 목록에서 구독을 취소하는 뉴스레터 링크; unsubscribeUrl($entry, 'newsletter') 또는 Recipient의 자체 링크를 사용하십시오.
  • 동기식 메일 리스너 또는 ShouldBeEncrypted 없이 대기열에 넣은 리스너.

Individual skills in this repo

This repo contains 13 individual skills — each has its own dedicated page.

Taldres/laravel-waitlist

Use this skill when reviewing Laravel package compatibility across composer constraints, PHP versions, Laravel versions, Testbench versions, dependency stability lanes, Windows CI, or matrix-sensitive code and workflow changes.

Taldres/laravel-waitlist

Use this skill when creating or updating the bundled Laravel Boost skill under resources/boost/skills from the package implementation and package documentation. Trigger after public APIs, commands, config, routes, views, publish tags, README content, or examples change.

Taldres/laravel-waitlist

Use this skill when preparing Laravel package releases: CHANGELOG.md updates, generated release notes, GitHub release workflows, version checks, tags, release validation, or release automation changes. Never publish autonomously.

Taldres/laravel-waitlist

Use this skill when adding Laravel package capabilities or wiring them through the service provider: commands, migrations, routes, config merges, views, translations, assets, middleware, publish tags, workbench files, or console-only behavior.

Taldres/laravel-waitlist

Use this skill when writing, editing, fixing, or reviewing package tests with Pest 4/5 and Orchestra Testbench, including TDD, feature tests, unit tests, type coverage, arch tests, workbench behavior, commands, routes, config, migrations, and publishable resources.

Taldres/laravel-waitlist

Integrate taldres/laravel-waitlist in a Laravel application: define purposes, lists and fields, build the signup form, send the confirmation mail from events, add a preference page, and keep consent, retention and encryption intact.

Taldres/laravel-waitlist

Build the pages of a taldres/laravel-waitlist integration: the signup form with the registered wording, and the confirm, unsubscribe and preference pages, either in Laravel controllers (Blade, Livewire, Inertia) or in an SPA or static site over the package's JSON API, including CORS and bot protection.

Taldres/laravel-waitlist

Turn a taldres/laravel-waitlist waitlist into a launch: invite people in batches in signup order, let invited addresses register, announce the launch to everyone who agreed, and erase the list once its purpose is fulfilled.

Taldres/laravel-waitlist

Operate a taldres/laravel-waitlist installation: answer access and erasure requests, withdraw a purpose on request, apply retention, erase a list once its purpose is fulfilled, rotate APP_KEY with waitlist:rekey, export a list, and check the setup before going live.

Taldres/laravel-waitlist

Run the waitlists of several products in one Laravel app with taldres/laravel-waitlist projects: define projects, scope facade calls with project(), resolve the project of HTTP signups, send mail per project, handle requests across all projects, or keep projects in a database for a central waitlist API.

Taldres/laravel-waitlist

Keep a newsletter tool such as Brevo, Mailchimp or Mailcoach in step with a taldres/laravel-waitlist waitlist: add confirmed contacts per purpose, remove them on withdrawal and erasure, and carry unsubscribes made at the provider back into the waitlist via a webhook.

Taldres/laravel-waitlist

Build waitlist statistics with taldres/laravel-waitlist: signups and confirmations per day for charts, totals and confirmation rates for a period, the confirmed count on any past day, and how many people are on a list right now, for dashboards, admin pages and API endpoints.

Taldres/laravel-waitlist

Write feature tests for an application's taldres/laravel-waitlist integration: get the plain tokens from events, assert the confirmation and other mails, test the signup, confirm and unsubscribe flows in PHP and over the package's HTTP routes, and bypass rate limits and bot checks in tests.

관련 스킬