https://github.com/madbob/automail
SMTP, IMAP and POP3 autoconfiguration
https://github.com/madbob/automail
imap ispdb pop3 smtp
Last synced: 10 months ago
JSON representation
SMTP, IMAP and POP3 autoconfiguration
- Host: GitHub
- URL: https://github.com/madbob/automail
- Owner: madbob
- License: gpl-3.0
- Created: 2017-08-14T11:21:44.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-16T10:53:31.000Z (almost 9 years ago)
- Last Synced: 2025-07-20T12:25:05.541Z (11 months ago)
- Topics: imap, ispdb, pop3, smtp
- Language: PHP
- Size: 13.7 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
AutoMail
========
This package wraps the SMTP, IMAP and POP3 autoconfiguration API described by
Mozilla.
For more informations, [read the Mozilla documentation](https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfiguration).
# Installation
`composer require madbob/automail`
# Usage
```php
require 'vendor/autoload.php';
use AutoMail\AutoMail;
use AutoMail\NotFoundException;
try {
/*
Pass your mail address to AutoMail::discover() to obtain an array with
all available configurations, both for incoming and outgoing messages
*/
$configuration = AutoMail::discover('yourmailaddress@libero.it');
print_r($configuration);
/*
[
'incoming' => [
[
'protocol' => 'IMAP',
'hostname' => 'imapmail.libero.it',
'port' => 993,
'socketType' => 'SSL',
'authentication' => 'password-cleartext',
'username' => 'yourmailaddress@libero.it'
],
[
'protocol' => 'POP3',
'hostname' => 'popmail.libero.it',
'port' => 995,
'socketType' => 'SSL',
'authentication' => 'password-cleartext',
'username' => 'yourmailaddress@libero.it'
]
],
'outgoing' => [
[
'protocol' => 'SMTP',
'hostname' => 'smtp.libero.it',
'port' => 465,
'socketType' => 'SSL',
'authentication' => 'password-cleartext',
'username' => 'yourmailaddress@libero.it'
]
]
]
*/
}
catch(NotFoundException $e) {
echo $e->getMessage();
}
```
# License
This code is free software, licensed under the The GNU General Public License
version 3 (GPLv3). See the LICENSE.md file for more details.
Copyright (C) 2017 Roberto Guido