attackuf.blogg.se

Email parser php
Email parser php





email parser php

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.

email parser php

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.







Email parser php