SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru whisher's Avatar
    Join Date
    May 2006
    Location
    Kakiland
    Posts
    732
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Catch a email msg.

    Hi.
    I've got a socket that get all the msg of an email box.
    I request the page by ajax like this:

    PHP Code:
    var messages=xmlobj.responseText.split('||||'); 
    now I've got all the messages but
    how could I format it getting ie

    Subject: test From: user@mysite1.net To: user@mysite2.net
    I've no idea about it

    Bye.

  2. #2
    SitePoint Guru whisher's Avatar
    Join Date
    May 2006
    Location
    Kakiland
    Posts
    732
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A message ie

    --Message headers starts below---

    Return-Path: <test123@gmail.com>

    X-Greylist: greylisting inactive for admin@mysite.net in SQLgrey-1.7.4

    Received: from rn-out-0102.google.com (rn-out-0910.google.com [64.233.170.191]) by mail3.servage.net (Postfix) with ESMTP id DE7DBFC85FD for <admin@mysite.net>; Thu, 15 Nov 2007 00:22:11 +0000 (GMT)

    Received: by rn-out-0102.google.com with SMTP id a43so318856rne for <admin@mysite.net>; Wed, 14 Nov 2007 16:22:07 -0800 (PST)

    DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=1dgvKupYYmLY0RlrljjaM7cXOISgDbwNWTDXn/rzNWc=; b=FPRqKrlfwgkhGtsSLAED6Xkm7y0qzRZIlLDMh4BL1NfgHgUVoHqjMA3LOkZJqORaWUzeHN1vOQKXMNV1tQWRoaSHzXggWnoOS5RcTQlGwr7sM6ZIE5t0h8Pr+DRWz0VSBkusn+pgs6/d8fyBFTgFKC4gVKMl1lhJnNTepq8KJ/s=

    DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=LhtD5ZgliIwwiKill2Ukd8DRk/sKhxv3rHmzFZNYaAKYTr3jT5JjkACMpe+4RWmI2QiwbdpD5RIwtsg7aVb3hwFNCh4sE/HKxGyZW6IXUq8OHz2t28nmVq71OrjC5qPqI4Lc5eQfZzAg+7R16eanIi8yvfsKTUdr0mvlfbXfpxg=

    Received: by 10.143.8.10 with SMTP id l10mr4297wfi.1195086126505; Wed, 14 Nov 2007 16:22:06 -0800 (PST)

    Received: by 10.142.170.19 with HTTP; Wed, 14 Nov 2007 16:22:06 -0800 (PST)

    Message-ID: <ea5def60711141622u377c918cp487ba8281039a8bd@mail.gmail.com>

    Date: Thu, 15 Nov 2007 05:52:06 +0530

    From: "test123" <test123@gmail.com>

    To: admin@mysite.net

    Subject: Re: test 1111

    In-Reply-To: <63168.203.193.165.72.1195086089.squirrel@extssl-srv1.net>

    MIME-Version: 1.0

    Content-Type: text/plain; charset=ISO-8859-1
    How can I get From etc ..........


    Bye.

  3. #3
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Server languages have a batch of tools especially designed to help you with that. With Javascript, you will have to try and do it yourself, a task which will almost certainly require using regular expressions, but I'll leave that to someone else who's more experienced in working with emails.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  4. #4
    SitePoint Guru whisher's Avatar
    Join Date
    May 2006
    Location
    Kakiland
    Posts
    732
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, I agree ...
    It's far better get a json object server-side.
    Cleaner and easier

    Bye.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •