From 879e10731c3052ef7a57d9274305b580256e926f Mon Sep 17 00:00:00 2001 From: Dubtempo Date: Wed, 11 Aug 2021 21:41:49 -0700 Subject: [PATCH] ReadMe Updates --- README.md | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ec4464b..bd78691 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,70 @@ -# ImapMailMerge +# [ImapMailMerge](https://gitea.dubtempo.com/NP/ImapMailMerge) +Program for simulating the effect of "mail merge" for IMAP emails. The program uses the _"Reply-To:"_ header +to send individual messages to one or more recipients. This helps address issues with deliverability when +there are many _CC_ or _TO_ addresses, or when _To_ and _From_ are the same, with many _CC_ addresses. + +*note -- this program might not be able to send to non-local address on **shared hosting**. + +
+ +## Requirements + +Make sure all dependencies have been installed before using this program: + +* [PHP](https://www.php.net/) ~ tested on PHP 7.4 +* Mailserver with IMAP connectivity (can be remote) + +
+ +## Project Installation + +Install this program via git pull: + +```shell +$ git clone https://gitea.dubtempo.com/NP/ImapMailMerge.git +``` + +
+ +## Project Usage + +To use this program, complete the following steps. + +1. Copy the sample config file "_config/config.ini.example_" to "_config/config.ini_". + +1. Update the variables in the config file: _config/config.ini_. + +1. Be sure to use the "whitelist" in the config for addresses you'd like to be able use the mailmerge. + +1. Run the program manually or by referencing it via cronjob. + +
+ +## How it works + +Here's a basic overview of how the code works. + +1. Emails are sent to the mailmerge account, eg: mailmerge@example.com. + +1. When the program is called (eg: via cronjob), the INBOX is searched for new messages. + +1. Messages in the INBOX are processed in the following way: + + 1. The FROM address is verified against the whitelist. + + 1. A new IMAP directory is made based on the sender's name. + + 1. Sub directories are also made for that sender: Error / Fail / Success. + + 1. Intended recipients are deduced from the Reply-To addresses specified in the message. + +1. Messages are then sent via php mail(). + +1. Upon completion, the message is moved to the appropriate IMAP directory based on the outcome of the mail() attempt. + +
+ +## Debugging + +You can debug this code by looking at the error logs. Uncomment the logging lines in ImapMailMerge.php for more info. \ No newline at end of file