Getting Email into Databases and have the address and header in seperate fields

Discussion in 'PHP' started by dark_destroyer, Jan 31, 2007.

  1. #1
    Hi All,

    I usually would attempt some sort of code before asking a question but I really havent a clue where to start, basically I want to download emails from our mail server and insert them into a MySQL database, but I need the address, email header, body of email and time/date stamp in seperate fields, is this possible?

    Would be grateful if someone could point me in the right direction. Thanks.
     
    dark_destroyer, Jan 31, 2007 IP
  2. picouli

    picouli Peon

    Messages:
    760
    Likes Received:
    89
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Depending on how the emails file you download from your mail server is, you can use 'explode' to - ahem... - explode all the fields and then insert them in a DB with your query.

    Show us some of your file and we might help you better
     
    picouli, Jan 31, 2007 IP
  3. dark_destroyer

    dark_destroyer Guest

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi picouli,

    As i said in my first post i would usually attempt some sort of code before starting this, but I dont know where to start, I would like to know how to start a php script that will download emails into a database, i would like an example of how this peice of code looks, i know its not normal practice to just ask someone how to do something without attempting it yourself first, but I really don't know where to start!!!
     
    dark_destroyer, Jan 31, 2007 IP