heddiyoussouf/mailtracker 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

heddiyoussouf/mailtracker

最新稳定版本:1.0.0

Composer 安装命令:

composer require heddiyoussouf/mailtracker

包简介

This package provides a simple yet effective solution to track email opens using an embedded image in Laravel applications. By embedding a unique image uri in emails, the package allows developers to identify when the email has been opened and viewed by the recipient.

README 文档

README

heddiyoussouf/mailtracker provides an efficient way to track email opens in Laravel applications. It integrates seamlessly, leveraging embedded images to monitor when recipients view their emails. Table of Contents

Features
Installation
Usage
Customizations
Conclusion

Features

Mail Model: Logs individual emails with details.
Mailtracker Model: Records email open actions with attributes such as ip and user_agent.
HasTracker Trait: Equips the Mail model with the ability to generate unique tracking URLs.

Installation

Install via Composer:

bash

composer require heddiyoussouf/mailtracker

If not using Laravel's package auto-discovery, register the service provider in config/app.php:

php

'providers' => [
    // ...
    Heddiyoussouf\Mailtracker\MailTrackerProvider::class,
]

Usage

Integrate the Mail and Mailtracker models as needed. Attach the HasTracker trait to your Mail model. Generate tracking URLs: For individual emails: $mail->singleView() For broadcast emails: $mail->multipleView() Embed the tracking image in the email's Blade view:

blade.php

@mailtracker($trackingURL)

Customizations

Publish Assets and Config:

bash

php artisan vendor:publish --provider="Heddiyoussouf\Mailtracker\MailTrackerProvider"

Styling the Image: The embedded image can be styled using its class mailtracker-image or its ID mailtracker-image.

css

.mailtracker-image {
    /* Your styles here */
}
/*or*/
#mailtracker-image {
    /* Your styles here */
}

Config Customizations: Adjust the mailtracker.php config to specify a custom image or make other configurations.

return [
    'image' => 'assets/footer.png',
];

Conclusion

Mailtracker simplifies email open tracking in Laravel. Through easy integration, detailed tracking, and flexible customization, it stands as a robust solution for all Laravel-based email campaigns.

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-09-06