this repository is not maintained any more! please use https://github.com/synox/disposable-mailbox instead, which is a complete rewrite with angularjs. it is also simpler by using IMAP, without database and it that does not need "pipe to command".
This disposable email solution can be hosted on your own standard PHP-webhoster. All you need is PHP with mailparse extension and "Pipe to a Program" functionality. The system is as simple as possible, with minimal codebase and complexity.
When accessing the web-app a random email address is generated for you. The page will reload until emails have arrived. You can delete emails and see the original sourcecode.
Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
https://creativecommons.org/licenses/by-nc/4.0/
- PHP, Version 5.3.0
- Apache 2
- mailparse extension
- Composer (PHP Package Manager)
-
assure the mailparse extension is installed. The following command should not print any error:
<?php mailparse_msg_create(); ?>
-
Clone/download this repository
-
run
composer install
- forward/pipe email to the php script
app/pipe_input.php
(e.g. cpanel docs) - (optionally) configure a different database like mysql in
app/config.php
- (optionally) configure the link redirection provider (to keep the existence of your installation secret) in
app/config.php
- security audit against xss/sqli
There is a Vagrantfile to be used with vagrant.
- install php: https://github.com/Homebrew/homebrew-php
- add php to path: fish config:
set PATH /usr/local/opt/php55/bin $PATH
pecl install mailparse
- (see "php --ini" for file: )
echo "extension=mailparse.so" >> /usr/local/etc/php/5.5/php.ini
First make sure you check the php error log. also enable php error reporting with error_reporting(E_ALL);
in config.php
.
Then also try to run the command manually from the command line. For this login into your server by ssh. Create a sample mail (like https://gist.github.com/synox/fa11060975bec7250a46) and save it somewhere on the server. Then run the script the same way as the mailserver would pipe the mail to it.
cat samplemail.txt | php /path/to/app/pipe_input.php
That should either process the mail or return an error.
I have another solution which is easier to configure and install: https://github.com/synox/disposable-mailbox
- inspired by script: https://github.com/moein7tl/TempMail/blob/master/web/index.php