Download the PHP package wedeto/mail without Composer

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

Wedeto\Mail

Mail is a class to send mails using a SMTP server. It was derived from Zend\Mail, which is the reason it is published using the New BSD license rather than MIT, like the rest of Wedeto.

Features

Difference from Zend\Mime

Wedeto\Mail\Mime is derived from Zend\Mime. The functionality has been extended to make it easier to use. Wedeto\Mail\Mime\Message itself can now be added as a part to a Mime multipart message, to create nested Mime structures.

This in turn allows you to send messages containing attachments, embedded images and text / html alternatives.

Differences from Zend\Mail

Wedeto\Mail is derived from Zend\Mail. However, it has been changed in fundamental ways. Every dependency on other parts of the Zend framework was stripped out. Additionally, support for other transports and protocol was stripped out. The aim of Wedeto\Mail is to be lightweight and functional, not to be a building block to create webmail application. Therefore, support for IMAP and POP was removed.

Support for alternate transports such as Sendmail and PHP's mail function was removed as well. When Sendmail is available, a SMTP server is usually also available on localhost and is therefore superfluous. PHP's mail function should not be used at all, as it's highly inefficient and inflexible.

Wedeto\Mail does not support to create a Wedeto\Mail\Message from an existing mail message. Because all POP and IMAP support has been stripped this is no longer necessary. This allowed to strip down the complex header parsing situation and store the header in a simpler structure.

A new class was added, Wedeto\Mail\HTMLMessage. This eases the construction of messages containing a HTML part, a text part, attachments and embedded images, to create a structure like:

HTMLMessage

Usage

There's one transport, Wedeto\Mail\SMTPMailer. It can be created without any argument, in which case it defaults to connecting to localhost on port 25. You can specify the following options:

Provide these options in an associative array:

A HTML message can be composed with Wedeto\Mail\HTMLMessage:

You can add attachments and embed images:

You can also generate the attachment or embedded image in memory and provide a stream:

The correct structure will be generated. When you set the HTML, the plain text is automatically generated by converting breaks and paragraphs to newlines and stripping all HTML. However, you may want to override this to provide your own text:

Once you are satisfied, you can use the transport to send the message.

That's it, it's sent!

Of course, you can also compile your own message using Wedeto\Mail\Message, building a message using Wedeto\Mail\Mime\Message and Wedeto\Mail\Mime\Part, much in the same way as you can with Zend\Mail and Zend\Mime.


All versions of mail with dependencies

PHP Build Version
Package Version
Requires wedeto/util Version ~1.0.0
wedeto/io Version ~1.0.0
php Version >=7.0.0
ext-mbstring 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 wedeto/mail contains the following files

Loading the files please wait ....