Hello.
I am looking for someone with spare time to write a PHP app for me.
I am just starting to learn PHP but something like this app is too advanced for me right now and I need it asap.
Also, having it will go a long way to advance my learning.

Email Log system

Many emails are received in a general account but only some of them are to be logged.
When an email is logged it is assigned to one or more unit #s.

information to be recorded:
Unit #
Email Date
Email Body
Comments
Undertaking
Undertaking Date
Status

Everything except the email date and body would be user input on a form (which I need).

I cannot conceive how a specific email could be selected in this form.
Also if the email has an attachment can it be saved with the email date and body?

I have MySQL 5.5, Apache 2.2 and PHP 52.17 installed and working in Microsoft 7 64 bit.

Dani AI

Generated

A concise implementation plan for an Email Log system (notes for ). The usual pattern is: pull messages from the general mailbox with PHP's IMAP functions (or import them via a cron job), save headers/body/attachments, and present a web list of unlogged messages. Selecting an email in the form is done by listing messages (subject, from, date, snippet) and associating each list item with the mailbox UID or Message-ID; clicking "Log" opens a form prefilled with the email date and body. Mark logged items by setting an IMAP flag or moving the message to a processed folder so duplicates are avoided.

A minimal data model to start (adapt types for MySQL):

emails
 - id INT PK
 - mailbox_uid VARCHAR
 - message_id VARCHAR
 - sender VARCHAR
 - subject VARCHAR
 - date DATETIME
 - body TEXT
 - imported_at DATETIME
 - logged TINYINT(1)

attachments
 - id INT PK
 - email_id INT FK
 - filename VARCHAR
 - path VARCHAR
 - mime VARCHAR
 - size INT

units
 - id INT PK
 - unit_number VARCHAR

email_units
 - email_id INT FK
 - unit_id INT FK

logs
 - id INT PK
 - email_id INT FK
 - comments TEXT
 - undertaking VARCHAR
 - undertaking_date DATE
 - status VARCHAR
 - created_at DATETIME

Practical workflow and cautions: either run a periodic importer that saves messages and attachments (attachments stored on disk, path in DB) or list live IMAP messages and fetch body/attachments on demand. Use IMAP UID + folder to uniquely identify messages; Message-ID helps dedupe across mailboxes. Prefer filesystem storage for attachments (avoid large BLOBs), sanitize filenames, limit sizes and types, and protect attachment URLs behind authentication. Use prepared statements (PDO/MySQLi) to avoid SQL injection. Note that PHP 5.2 is very old; enable the IMAP extension in php.ini if staying on that version, but upgrading PHP is strongly recommended. As noted, this forum expects focused questions rather than full project requests; the above steps provide a clear roadmap for building the app or discussing smaller, specific implementation questions.

Recommended Answers

All 4 Replies

So this is a job offer?

well it wasn't intended to be a job offering, just a plea for help.
I suppose I could come up with a few bucks to donate.

You're welcome to ask for help with specific questions in this section of the forums, but asking people to write code for you belongs in Web Development job offers.

We do expect people to demonstrate an effort on their own. It's not a code-by-request service.

Oops sorry, I didn't know this.
Thx.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.