WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-07-2007, 06:52 AM
WebProWorld New Member
 

Join Date: Aug 2007
Posts: 1
sinnan RepRank 0
Default How a message sent through email can be inserted in database on serverside?

The main purpose of this post is to hide email addresses of both parties communicating / control spam

Well this is something like guru.com or elance.com where the professional's email is not known to buyers. Pro and Buyers either can discuss on private message boards, where both have functionality to post their messages. every posted message is recorded in database and also sent to receiver email address (provided in their profile)

This communication is so easy simply involve one or two messaging pages for both parties and on submit action save them to database also send email to receiver.

What makes it complex!!!

when we let the receiver answer the email from his/her inbox in regular fashion by sending a reply and require to save the message in the ongoing correspondence table in the online database. In this way both parties still communicating using emails without requiring to singin in the website and still the website is saving all the messages back and forth.


What are the possibilities:

When the receiver got email it has some kind of correspondence id in subject or body mostly Help/Support ticket system embed ticket id in the subject and from address is usually something like disscussionboard@guru.com. Receiver have option to simply reply the message without changing the subject or inside body and the system received that email record the correct message in the database and also email it to other party.

This is some kind of SERVER side email processing?

How the server read from the email?

Does this involve any server feature? is it something to do with MailServer?


What I am considering right now to set any Email Filter which judge specific data in Subject and save that email in any folder. Later with the help of Cron job in linux server I run any script with regular gaps which read the text files extract the message save them to database and email to the sender.
Reply With Quote
  #2 (permalink)  
Old 08-07-2007, 08:24 AM
WebProWorld Veteran
 

Join Date: Aug 2003
Location: Cornwall, UK
Posts: 833
speed RepRank 1
Default Re: How a message sent through email can be inserted in database on serverside?

Quote:
This is some kind of SERVER side email processing?
Yes
Quote:
How the server read from the email?
The 2 options I'd use is:

1. Collect all emails into a single mailbox and then periodically run a cron job to connect to the mailbox and download each email. You could use PHP IMAP functions to do this http://uk2.php.net/imap

As each email is downloaded the script/application would use the subject line to associate the email with the conversation.

2. Pipe the email arriving at a predetermined address to a script or application which again uses the subject to associate the email with the conversation. If you're running Unix of some flavour then the message is normally passed in on the standard input stream. The following link gives some info on this with PHP http://www.evolt.org/article/Incomin...914/index.html

Option 2 will give a more immediate update as it's invoked as soon as the email arrives while option 1 will only run at a given frequency.

In both cases you need to handle spam, corrupted messages and attachments, to mention a few things.

Both options could just store the message body in the database with a time stamp.
__________________
TOLRA Micro Systems Limited US & UK Web Hosting with Continuous Data Protection
Web Directory 2 for 1 Offer : Web Directory Script
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , , , , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Email spam bots - display name vs. actual email address apalmer123@msn.com Web Programming Discussion Forum 25 09-04-2007 01:13 PM
Why is this line being inserted...? Dragonsi Internet Security Discussion Forum 4 11-30-2004 05:11 PM
www.infojet.net - New worldwide email database site mathjoy Submit Your Site For Review 3 06-08-2004 01:09 PM
Building an email list from our existing customer database Belltoons Marketing Strategies Discussion Forum 0 05-06-2004 09:23 AM


Search Engine Optimization by vBSEO 3.2.0