Like CFPOP, but read text file of mail message and parse instead

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Like CFPOP, but read text file of mail message and parse instead

    I have an existing (non CF) support tracking system that read emails from a
    server and populates a database. I'm writing a report in CFMX that will take
    a case number and assemble a report of the conversations, etc. A Blob file
    stores the full email message as it would appear in a mail file. I can get
    that info out of the DB fine with CFMX.

    Using 6.1, is there a known way or tag out there that will allow me to take
    that query result (either after I make it a string or even write it to a
    temp file) then extract just the textbody message?

    I have experience with CFPOP and utilizing the .TEXTBODY attribute from it's
    query object... but it won't suffice for this application. Is there some
    hacky way to get CFPOP to read an email file and parse it?

    Any ideas?

    CT


    Charles R. Thompson Guest

  2. Similar Questions and Discussions

    1. Mail password stored in text file neo-mail.xml
      Hello, I would like to use the Mail page of CF Administrator to specify username: password@mail_server_name and use a cfmail tag to send emails. I...
    2. reading mail useing cfpop
      Does anybody have a script using the CFPOP function for another plug-in that will allow me check an e-mail account for error message such as...
    3. Parse text file and increment
      Hello, I have a perl script that opens up a text file and displays the data fine. My textfile: 111.111.111.1-25|DEPTA ...
    4. [PHP] mail() - how to attach file to the message???
      no. i`m not trying to upload file on server. i want to send e-mail with attachments but if it's possible without using classes. i thought...
    5. mail() - how to attach file to the message???
      do you want to send a file via mail (mime-type of the file?) or do you want to attach the file to a mail (multipart?)? the mail-format is defined...
  3. #2

    Default Re: Like CFPOP, but read text file of mail message and parse instead

    > I have experience with CFPOP and utilizing the .TEXTBODY attribute from
    it's
    > query object... but it won't suffice for this application. Is there some
    > hacky way to get CFPOP to read an email file and parse it?
    For the heck of it I looped over my email list and tried directly writing
    the email bodies with headers to an account file on the email server, then
    reading in through POP3... almost worked but the headers seemed to munge
    everything into one email with additional messages as attachments

    Still looking for a solution.


    Charles R. Thompson Guest

  4. #3

    Default Re: Like CFPOP, but read text file of mail message and parse instead

    > Using 6.1, is there a known way or tag out there that will allow me to
    take
    > that query result (either after I make it a string or even write it to a
    > temp file) then extract just the textbody message?
    Charles,

    You would have to parse the message. If you are handy with Java, you might
    be able to use the JavaMail APIs to parse the message and extract the
    content. This would be a pretty tricky thing to do and it may be easier to
    write some CFML to parse the text of the message to extract the parts you
    want.

    In short there is no easy way to do what you want.


    --
    Tom Jordahl
    Macromedia Server Development


    Tom Jordahl Guest

  5. #4

    Default Re: Like CFPOP, but read text file of mail message andparse instead

    CFX_POP3 is able to read .eml files using an action attribute of LOADFROMFILE.
    Paul WA Guest

  6. #5

    Default Re: Like CFPOP, but read text file of mail message andparse instead

    doing some research & stumbled into this. if you haven't already solved this,
    tom had the right idea but maybe too pessimistic about it's difficulty (or i've
    been doing too much javamail lately). see if this helps

    <cfscript>

    mailBLOB=createObject("java","java.io.ByteArrayInp utStream").init(yourBlobGoesH
    ere);
    mailSession=createObject("java","javax.mail.Sessio n");

    mimeMessage=createObject("java","javax.mail.intern et.MimeMessage").init(mailSes
    sion,mailBLOB);
    subject=mimeMessage.getSubject();
    from=mimeMessage.getFrom();
    sentDate=mimeMessage.getSentDate();
    PaulH Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139