Download the PHP package toropyga/fmail without Composer

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

Fmail

PHP Mail sender script

License Version PHP

Description and usage examples for the FMail PHP class for sending and receiving mail.

Table of Contents

Overview

The FMail class is designed for sending and receiving email messages using PHP. This class is not a full-featured email client! It requires PHP version 4 or higher.

Features of the FMail class

Allows sending mail using the standard PHP mail() function, or, without using that function directly, connecting to a specified mail server via a socket.

Allows receiving mail using the PHP IMAP library.

Supports authorization on mail servers using the PLAIN and LOGIN methods.

Supports the ISO-8859-1, UTF-8, WINDOWS-1251, and KOI8-R text encodings (charsets).

Supports sending messages in both plain text and HTML format.

Sending a message to multiple recipients.

Supports limiting the number of recipients per message — i.e., if several recipients are specified and the recipient limit is set to 1, a separate message will be created and sent to each recipient individually.

Supports sending messages to hidden recipients, whose name and address are not shown in the "To" field.

Allows attaching files of any format to a message.

Creating a message from any HTML file, including loading images, stylesheets, and scripts.

Supports converting text from Windows-1251 encoding to UTF-8 and back, without requiring the iconv module.

Email address format validation.

Logging of all actions.

How it works

Core message-sending functions

Include the class file

or using Composer

Initialize the class

Warning!!! The class has default values. All default parameters can be changed in the "Script (class) settings variables" block, or via the special class functions described below.

By default, the script uses the PHP mail() function. To connect via a socket instead, specify:

When connecting via a socket, the default server is localhost. To change it, use:

When connecting via a socket, the default port is 25. To change it, use:

When connecting via a socket, the default socket response timeout is 10 seconds. To change it, use:

When connecting via a socket, user authorization on the server is not required by default. To change this, use:

For authorization, you must specify the user's login and password. Use the functions:

By default, the limit on the number of simultaneous message recipients is 1 (one). To change it, use:

By default, UTF-8 text encoding is used. To change it, use:

Specifying message recipients. (For more details, see the function description)

Clear the list of recipients, since the setTo function is cumulative

Specifying hidden recipients (BCC) of the message, if needed. (For more details, see the function description)

Clear the list of hidden recipients, since the setBcc function is cumulative

Specifying the message sender. (For more details, see the function description)

or

Specifying the message subject

Setting the message body.

There are 4 different functions available for setting the message body. When creating a message, choose only one, since each function does not append new text to the previously set message body — it replaces the old text with the new one!!!

  1. Creating a plain text message (text/plain)

  2. Creating a text message in HTML format

or

  1. Creating a plain text message (text/plain) from an HTML file

  2. Creating a message from an HTML file (returns true or false)

Adding files to the message (returns true or false)

Clear the list of files, since the setFile function is cumulative

Sending the message (returns true or false)

Core message-receiving functions

Include the class file

Initialize the class

By default, the connection uses localhost as the server. To change it, use:

When connecting via IMAP, the default port is 143. To change it, use:

The IMAP protocol is used by default for connections. POP3 can be used, but it is not recommended. To change this, use:

Setting connection flags for the imap_open function

For authorization, you must specify the user's login and password. Use the functions:

Read the list of folders.

Setting the folder to read its contents

Returns the list of messages in a folder. All parameters are optional. Specify the folder name, the message number to start reading from, and the number of messages to return (see the function description)

Returns the list of messages in the mailbox based on the specified parameters

Reading a message by message number

Reading a message by UID

Additional functions

Validating the format of an email address (returns true or false)

Converting text from Windows-1251 encoding to UTF-8

Converting text from UTF-8 encoding to Windows-1251

Enabling the script's debug functions (displays an error message on screen if one occurs)

Viewing the class logs. Pass the parameters for the logs you need. 0 - all logs, 1 - executed functions, 2 - data sent and received, 3 - errors

Decoding strings of the form =?utf-8?B?0KHQv9GA0LDQstC+0YfQvdC40Log0JHQmNCa?=

Usage example


All versions of fmail with dependencies

PHP Build Version
Package Version
Requires php Version >=5.1.0
toropyga/base Version ^1.0.3
ext-imap Version *
ext-fileinfo Version *
ext-iconv Version *
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 toropyga/fmail contains the following files

Loading the files please wait ...