Download the PHP package mouf/utils.mailer.smtp-mail-service without Composer

On this page you can find all versions of the php package mouf/utils.mailer.smtp-mail-service. 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 utils.mailer.smtp-mail-service

The SmtpMailService

The SmtpMailService is used to send mails using a SMTP mail server.

The SmtpMailService is designed to be simple to use. Behind the scene, the SmtpMailService is using the more complex (and more powerful) ZendFramework 2 mail service.

Install

This package is part of the Mouf PHP framework. As such, it comes with a nice graphical installer.

You can configure the settings to connect to your SMTP server.

There is one compulsory parameter: host, which is the address of the server.

By default, on Linux systems, it is likely you will use the local mail server (host=127.0.0.1). You will have a "sendmail" or "postfix" server installed on your machine. If you are performing your developments on a Windows machine, it is quite likely that you will not have an SMTP server on your machine. You will therefore have to use a remote server. To access the remote server, you will certainly have to use login/passwords, etc...

When this package is installed, it will create a default "smtpMailService" and put in this instance all the parameters you have provided.

Note: nothing prevents you from creating several instances of the SmtpMailService class with different parameters (in the rare case you have an application that needs to connect to several SMTP servers).

After installation, you will see that a number of constants have been added to your config.php file. When deploying on other servers, you can of course change those constants to adapt to the settings of the server.

Tip: using your gmail account to send mails

In a development environment, it can be useful to use you gmail account. Here are the settings:

Example use

Below is a sample code you can use to send a mail.

To learn more about how to send mails, refer to the Introduction to Mouf's mail architecture.


All versions of utils.mailer.smtp-mail-service with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
mouf/utils.common.mouf-helpers Version ~2.0
mouf/utils.mailer.mail-interface Version ~2.0
mouf/utils.log.errorlog_logger Version ~2.0
zendframework/zend-mail Version ~2.1@stable
zendframework/zend-eventmanager Version ~2.1@stable
zendframework/zend-servicemanager Version ~2.1@stable
zendframework/zend-validator Version ~2.1@stable
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 mouf/utils.mailer.smtp-mail-service contains the following files

Loading the files please wait ....