<commit_before>trapemail
=========

Extend Network/Email/CakeEmail allowing override original recipients<commit_msg>Adding comments<commit_after>trapemail
=========

Extend Network/Email/CakeEmail allowing override original recipients

Usage
-----
Whenever you need to send email, ensure this class is loaded:
```php
App::uses('TrapEmail', 'Lib/Network/Email');
```

add to your config array a new element 'realRecipients': 
```php
$config['realRecipients'] = array('<EMAIL>');
```
use $config to create a new TrapEmail object:
```php
$email = new TrapEmail($config);
```

after ```$email->send()``` you will get an email in <EMAIL> with original recipients in the header as below:
X-intended-to
X-intended-cc
X-intended-bcc


{'fraction_non_alphanumeric': 0.15013774104683195, 'fraction_numerical': 0.0, 'mean_word_length': 5.794392523364486, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '5743994', 'n_tokens_mistral': 232, 'n_tokens_neox': 215, 'n_words': 73}