承接 rcastera/mailer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

rcastera/mailer

Composer 安装命令:

composer require rcastera/mailer

包简介

Mail Abstraction Class

关键字:

README 文档

README

A simple wrapper to PHP's native mail function that includes cc, bcc, priority and attachments.

Setup

Add a composer.json file to your project:

{
  "require": {
      "rcastera/mailer": "v1.0.0"
  }
}

Then provided you have composer installed, you can run the following command:

$ composer.phar install

That will fetch the library and its dependencies inside your vendor folder. Then you can add the following to your .php files in order to use the library (if you don't already have one).

require 'vendor/autoload.php';

Then you need to use the relevant class, and instantiate the class. For example:

Getting Started

require 'vendor/autoload.php';

use rcastera\Email\Mailer;

$mailer = new Mailer();

Example

<?php
    require 'vendor/autoload.php';
    use rcastera\Email\Mailer;
    $mailer = new Mailer();

    $mailer = new Mailer();
    $mailer->priority(3); // 1 for urgent, 3 for normal.
    $mailer->to(array('email@domain.com'));
    $mailer->cc(array('email@domain.com'));
    $mailer->bcc(array('email@domain.com'));
    $mailer->from('John Doe', 'email@domain.com');
    $mailer->subject('This is a test!');
    $mailer->body('Hi this is the body of the email.');
    $mailer->attach(array('example.zip'));

    if ($mailer->send()) {
        echo('Email sent!');
    } else {
        echo('Error sending Email!');
    }

    unset($mailer);
?>

Contributing

  1. Fork it.
  2. Create a branch (git checkout -b my_branch)
  3. Commit your changes (git commit -am "Added something")
  4. Push to the branch (git push origin my_branch)
  5. Create an [Issue][1] with a link to your branch
  6. Enjoy a refreshing Coke and wait

统计信息

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

GitHub 信息

  • Stars: 9
  • Watchers: 1
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-09-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固