Download the PHP package gulltour/phpmailer without Composer

On this page you can find all versions of the php package gulltour/phpmailer. 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 phpmailer

yii2-phpmailer

Phpmailer extension for the Yii framework yii2-phpmailer

PHPMailer integration for Yii 2 framework

WARNING !!!

Breaking backwards compatibility changes were introduced in Yii2 Framework (see https://github.com/yiisoft/yii2/issues/4071).

If you updated after 26.06.2014 your should fix your application config and calls to mail functions (replace mail with mailer).

In configuration file you should replace:

with

In your code replace:

Yii::$app->mail->... with Yii::$app->mailer->...

(or Yii::$app->getMail()... with Yii::$app->getMailer()... respectively).

===

This extension adds integration of popular PHPMailer library - a "full-featured email creation and transfer class for PHP" - to Yii 2 framework.

Although extension classes implement yii\mail\MailerInterface and yii\mail\MessageInterface, some methods of Yii 2 BaseMailer and BaseMessage are overriden - mainly because of PHPMailer-specific issues.

Nevertheless - the behavior of the extension should remain expected and predictable and comply interfaces mentioned above (I believe so). If not - feel free to report issues.

REQUIREMENTS

You should generally follow Yii 2 requirements. The minimum is that your Web server supports PHP 5.4.0.

INSTALLATION

Install via Composer

If you do not have Composer, you may install it by following the instructions at getcomposer.org.

During the extension installation PHPMailer library will be also installed.

You have two options here - to install latest stable release of PHPMailer (as of now it is 5.2.8 - many significant issues were solved and improvements made in this release) or install latest development version from dev-master.

So, either run

or add respectively:

or

to the require section of your composer.json.

Note: this can be affected by 'minimum-stability' settings in your project root composer.json file. If you see error trying to install 'dev-master' branch of PHPMailer you should explicitly point to it, adding

to the require section of composer.json in your project root.

Install from an Archive File

You may install extension manually. For that purpose you have to download archive file and extract it into vendor/zyx directory of your project.

You'll also need to download PHPMailer library and extract it to vendor/phpmailer directory of your project.

Note: due to naming agreement 3rd-party extensions and libraries are kept under vendor directory.

One of the benefits of installing via Composer is automation of autoload setup. If you install extension and PHPMailer library from archive files, you'll have to setup autoload paths manually.

Note: currently PHPMailer does not support namespaces (as its minimum requirements is php 5.0), but provides an SPL-compatible autoloader, and...

the preferred way of loading the library - just require '/path/to/PHPMailerAutoload.php'; and everything should work

For further information refer to PHPMailer documentation.

CONFIGURING

To use this extension, you should add some settings in your application configuration file. It may be like the following:

This is the tipical configuration for sending email via smtp. If you are familiar with PHPMailer, you can see that 'config' array holds settings, similar to corresponding PHPMailer properties. They will be populated when Mailer is initialized.

You can for example define

or

You may also configure some default message settings for your application in 'messageConfig' array. They will be populated at the moment of message creation.

For example, you may predefine default contents of 'From' email field - so you will not have to set 'From' it every time when composing message:

USAGE

Example of simple usage:

Example of sending html emails rendering view and layout (assumed that default 'From' is set in application configuration file):

Note: possibility to set 'htmlLayout' dynamically when composing message is not the native behavior of BaseMailer. This feature was introduced in this specific extension and is experimental.

For more examples of usage you may refer to documentation on Yii 2 BaseMailer and BaseMessage and PHPDoc blocks in the extension files.

Additionally some Wiki articles are available.


All versions of phpmailer with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
yiisoft/yii2 Version *
phpmailer/phpmailer Version *
soundasleep/html2text Version *
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 gulltour/phpmailer contains the following files

Loading the files please wait ....