PHPackages                             wambacom/smtpd - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. wambacom/smtpd

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

wambacom/smtpd
==============

Fork thefox/smtpd. SMTP server (library) written in PHP. In this fork we use eXorus/php-mime-mail-parser as mail parser instead of zend::message

0.1.2(11y ago)21.8kGPLv3PHPPHP &gt;=5.3

Since Aug 1Pushed 11y ago4 watchersCompare

[ Source](https://github.com/mambaru/smtpd)[ Packagist](https://packagist.org/packages/wambacom/smtpd)[ Docs](http://fox21.at)[ RSS](/packages/wambacom-smtpd/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (9)Versions (4)Used By (0)

SMTPd
=====

[](#smtpd)

SMTP server (library) written in PHP. This library only provides an interface to the SMTP protocol with PHP. You need to deliver the mails by yourself.

Why this project?
-----------------

[](#why-this-project)

Believe it or not, **email is still the killer feature of the Internet**. There are tons of projects like [PHPMailer](https://github.com/PHPMailer/PHPMailer): to send emails programmatically (with PHP). But there are not so many to receive emails from SMTP.

With this interface you can do something like this for your app users:

```
User  MUA (like Thunderbird)  SMTP  Your PHP App

```

This is useful when you have a messaging application written in PHP but no graphical user interface for it. So your graphical user interface can be any [email client](http://en.wikipedia.org/wiki/Email_client). [Thunderbird](https://www.mozilla.org/en-US/thunderbird/) for instance.

Installation
------------

[](#installation)

The preferred method of installation is via [Packagist](https://packagist.org/packages/thefox/smtpd) and [Composer](https://getcomposer.org/). Run the following command to install the package and add it as a requirement to composer.json:

`composer.phar require "thefox/smtpd=~0.1"`

Stand-alone server
------------------

[](#stand-alone-server)

1. Clone project from GitHub.

    `git clone https://github.com/TheFox/smtpd.git`
2. Install dependencies.

    `make`
3. To start a stand-alone server you can type the following command in your shell:

    `./application.php server -d`

    To show the usage options use `-h`:

    `./application.php server -h`

    You can change the IP and port. Default port is 20025.

    `./application.php server -a 0.0.0.0 -p 25`

**Note:** The stand-alone server is only for testing. If you want to use it for production you need to define a save/deliver function. See example below.

Usage
-----

[](#usage)

Use this library to provide an IMAP server in your own project.

```
