

Virtually all UNIX variants outside of really tiny embedded systems will have a local MTA running, specifically so that anything that needs to send email will have a way to do so without having to speak SMTP. The MUA generates the email, either via script or from user input, makes sure it's encapsulated properly as per international standards (the equivalent of writing the address in the proper place and adding the right amount of stamps) and hands it off to its configured MTA.When you send an email, what happens is as follows: A Mail Delivery Agent (MDA) serves as the endpoint of a pipeline when an MTA determines that a particular email should be delivered locally, it calls on the MDA to handle things.Nowadays, this generally includes making sure the email it gets handed is something it should pass on before doing so, but that's outside the scope for now. A Mail Transfer Agent (MTA) is solely concerned with the business of moving email from one place to another.Technically speaking, when your PHP script sends an email it's acting as an MUA. Its purpose is to allow a user to send emails, or retrieve them from a mailbox and read them. A Mail User Agent (MUA) is what you'd call a "mail client".Okay, I'm going to take a few steps back and explain some things about how email works under the hood, because judging by your questions in comments part of your problem with this question is that you don't understand how things work, which in turn is causing misconceptions as to what you need to do to accomplish what you want. If you are using postfix to receive emails on the machine this script runs on, make sure to call procmail in /etc/postfix/main.cf: mailbox_command = procmail -a "$EXTENSION" (Of course you can use other languages you are familiar with for this purpose as well). Since you probably should test the response anyway (if not to extract some extra database fields, at least to throw away spam) you might want to write your_script in PHP using PECL to parse its content and store it in your database. You can leave out the Subject line if you want all mails to that email address processed, or use different selection criteria.Īs for your_script I don't know of any commandline mail clients that directly put your material in a database.

procmailrc file in the home directory of the receiving user that has the following: :0 The response processing can be done by calling any script from procmail, for that you need a. You can and probably should separate your sending application from your response processing application. your PHP application) to store email (or data extracted from that) in a database. Your question is a bit confusing, as you refer to a text-based mail client and a PHP application and then specify that "the application" (i.e.
