Campaign Email Handler (Mail/CampaignMail.php)

laravel-crm · packages/Webkul/Marketing/src/Mail/CampaignMail.php · php · MIT
email, crm, fw:laravel

Handles sending campaign emails with customizable content and recipients.

// Source: https://github.com/krayin/laravel-crm | License: MIT | Copyright 2010-2025, Webkul Software
// Provided via justclaw.it.com; keep this notice with the code.
<?php

namespace Webkul\Marketing\Mail;

use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Address;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Webkul\Marketing\Contracts\Campaign;

class CampaignMail extends Mailable
{
    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct(
        public string $email,
        public Campaign $campaign
    ) {}

    /**
     * Get the message envelope.
     */
    public function envelope(): Envelope
    {
        return new Envelope(
            to: [
                new Address($thi

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key