<commit_before>TempMail.php
===========

Generate random or custom temporary email address with available domains, and receive email messages.
Uses temp-mail.org's API [https://temp-mail.org/en/api](https://temp-mail.org/en/api).


### Install ###

Just include ```dist/TempMail.php``` file and you're ready to go.


### Usage ###

**Generate new random email address**

```
$tempMail = new TempMail();
```


**Generate new custom email address**

```
$tempMail = new TempMail('john.doe', '@leeching.net');
```

*NOTE: Second parameter must begin with '@' sign, and it has to be inside available domains list*


**Get list of available domains**

```
$domainsList = $tempMail::getDomains();
```

*NOTE: getDomains() method can receive an optional format parameter ('xml', 'json', 'php', 'html'). Default is json.*


**Available variables**

```
// Get email name
echo $tempMail->name;

// Get email domain
echo $tempMail->domain;

// Get full email address
echo $tempMail->address;
```<commit_msg>Updated docs<commit_after>TempMail.php
===========

Generate random or custom temporary email address with available domains, and receive email messages.
Uses temp-mail.org's API [https://temp-mail.org/en/api](https://temp-mail.org/en/api).


### Install ###

Just include ```dist/TempMail.php``` file and you're ready to go.


### Usage ###

**Generate a new random email address**

```php
$tempMail = new TempMail();
```


**Generate a new custom email address**

```php
$tempMail = new TempMail('john.doe', '@leeching.net');
```

*NOTE: Second parameter must begin with '@' sign, and it has to be inside available domains list*


**Get list of available domains**

```php
$domainsList = $tempMail::getDomains();
```

*NOTE: getDomains() method can receive an optional format parameter ('xml', 'json', 'php', 'html'). Default is json.*


**Available variables**

```php
// Get email name
echo $tempMail->name;

// Get email domain
echo $tempMail->domain;

// Get full email address
echo $tempMail->address;
```

**Check and get a list of emails for a mailbox**

```php
$emails = $tempMail->getEmails();       // PHP array
$emails = $tempMail->getEmails('raw');  // raw (default: json)
```

**Check and get a list of sources for a mailbox**

```php
$emails = $tempMail->getSources();       // PHP array
$emails = $tempMail->getSources('raw');  // raw (default: json)
```

**Delete a message by it's ID**

```php
$del = $tempMail->deleteMessage('messageID');
```
{'fraction_non_alphanumeric': 0.17690117934119562, 'fraction_numerical': 0.0, 'mean_word_length': 4.442477876106195, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 14, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1132999', 'n_tokens_mistral': 793, 'n_tokens_neox': 746, 'n_words': 264}