PHP Developer's Network : Network Member Forums

PHP Classes

Subject: Readattachment class

Icontem


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! Trackback URL: http://www.phpclasses.org/trackback/discuss/package/3169/thread/60/

      MIME E-mail message parser   All threads   Readattachment class   (Un) Subscribe thread alerts  
Subject:Readattachment class
Summary:I need help with the readattachment class.
Messages:12
Author:Carl Wuensche
Date:2008-08-06 00:07:53
Update:2008-08-24 00:06:58
 
  1 - 10   11 - 12  

  1. Readattachment class   Reply  
Picture of Carl Wuensche
Carl Wuensche
2008-08-06 00:07:54
I want to be able to have the variable of the message body of the incoming email, and then use a preg match to get values of the username and password they input.

Example:

Subject: Whatever
Message:
username: stuffradio
password: pass123

<attached image here>

That's what the email would look like essentially. How can I read the email body, and with regex get the value of the username and password?

  2. Re: Readattachment class   Reply  
Picture of Manuel Lemos
Manuel Lemos
2008-08-06 00:22:45
I am not sure what you mean. Is that an HTML message with an embedded image?

  3. Re: Readattachment class   Reply  
Picture of Carl Wuensche
Carl Wuensche
2008-08-06 00:59:00
Someone sends an email to a gmail address. I am using the readattachment class to get the email.

I can successfully get the attachment from the email, but I want to be able to get the message, and get the username and password that they enter with regex.

I was showing you an example of what the email should look like. The attachment that I put in the text of my message is just a representation of the attachment of an image in the email that I will be parsing.

  4. Re: Readattachment class   Reply  
Picture of Manuel Lemos
Manuel Lemos
2008-08-06 01:25:13
I don't know about any readattachment class.

You can use the POP3 class in conjunction with the MIME parser class to get the message from Gmail POP3 server and then you make the message be parsed automatically by the MIME parser class.

http://www.phpclasses.org/pop3class

  5. Re: Readattachment class   Reply  
Picture of Carl Wuensche
Carl Wuensche
2008-08-06 01:28:54
I'm referring to this

http://www.phpclasses.org/browse/package/2964.html

  6. Re: Readattachment class   Reply  
Picture of Manuel Lemos
Manuel Lemos
2008-08-06 01:55:15
OK, but I did not develop that class, so I cannot help you with it.

The POP3 class I mentioned above it was developed by me, so I can help you to integrate with it.

Actually it comes with an example that is almost ready to read messages from Gmail and parse them in a way that is easy to process by applications.

  7. Re: Readattachment class   Reply  
Picture of Carl Wuensche
Carl Wuensche
2008-08-22 07:40:26
Are you able to help me easily use this class instead of my previous one? My previous class works fine... but when I send an email from a mobile phone, it doesn't download the image properly. It only downloads a file called 'nfn2252.alternative'. So it's not decoding something properly.

I would prefer to use your class if it's easily doable because you actually provide support.

  8. Re: Readattachment class   Reply  
Picture of Manuel Lemos
Manuel Lemos
2008-08-22 13:16:54
Using this class is straightforward. Just try to use it and let me know if you have any difficulties.

  9. Re: Readattachment class   Reply  
Picture of Carl Wuensche
Carl Wuensche
2008-08-23 19:28:28
I tried looking at the test classes... but I don't understand. It looks like it's forcing me to use a '.eml' file but I don't have that. I'm just parsing the emails in the inbox.

  10. Re: Readattachment class   Reply  
Picture of Manuel Lemos
Manuel Lemos
2008-08-23 20:24:44
The example script test_message_decoder.php is ready to be run from the command line taking as argument the message file name.

If you do not specify any message file name or you run as a Web server script, you can change the default message file name in the script itself where it says test/sample/message.eml .

If you are accessing the messages from a POP3 server, you can also check the examples that come with the POP3 class that integrate with the MIME parser class to read messages directly from the server without having to store them in a file first.

http://www.phpclasses.org/pop3class


 
  1 - 10   11 - 12  
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2008 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products