Download the PHP package eoghanobrien/php-simple-mail without Composer

On this page you can find all versions of the php package eoghanobrien/php-simple-mail. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-simple-mail

README

Build Status Latest Stable Version Scrutinizer Quality Score Code Coverage Total Downloads License PHP 7 ready

Introduction

Simple Mail Class provides a simple, chainable wrapper for creating and sending emails using the PHP mail() function. There are better options out there for sending SMTP email, which are more secure and more reliable than the mail() function. However, sometimes you just need to send a simple email. That's what we cover.

Installation via Composer

Usage

Instantiating the class.

You have two options, you can 'new up' the class in the traditional way:

or instantiate it using the named static constructor make()

The static constructor can be useful when you want to continue chaining methods after instantiating.

To header

The To header can be called multiple time, in order to pass more than one To address, simply call the setTo method as many times as needed. It takes two string parameters. The first parameter is for the email address, the second is for the name.

From header

You can carbon copy one or more addresses using the setBcc method. It takes two string parameters. The first parameter is for the email address, the second is for the name.

Cc header

You can carbon copy one or more addresses using the setCc method. It takes an array of $name => $email pairs. Alternatively, you can pass a simple numerically keyed array an the value is assumed to be the email.

Bcc header

You can blind carbon copy one or more addresses using the setBcc method. It takes an array of $name => $email pairs. Alternatively, you can pass a simple numerically keyed array an the value is assumed to be the email.

Subject header

You can set the subject using setSubject method. It takes a string as the only parameter.

Message header

You can set the message using setMessage method. It takes a string as the only parameter.

HTML emails

If you want to include HTML in your email. Simply call the setHtml() method. It takes no parameters.

send emails

Once you've set all your headers. Use the send() method to finally send it on it's way.

Full example of sending an email

Example of sending an email with attachments

If you are sending an attachment there is no need to add any addGenericHeader()'s. To properly send the attachments the necessary headers will be set for you. You can also chain as many attachments as you want (see example).

License

php-simple-mail is free and unencumbered public domain software. For more information, see http://opensource.org/licenses/MIT or the accompanying MIT file.


All versions of php-simple-mail with dependencies

PHP Build Version
Package Version
Requires php Version >=5.2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package eoghanobrien/php-simple-mail contains the following files

Loading the files please wait ....