PHP Classes

getting the needed info

Recommend this page to a friend!

      PHP MIME Email Message Parser  >  All threads  >  getting the needed info  >  (Un) Subscribe thread alerts  
Subject:getting the needed info
Summary:how to get ["from "] and ["to:"]
Messages:8
Author:Jvisser
Date:2009-01-06 19:12:11
Update:2009-01-08 17:01:49
 

  1. getting the needed info   Reply   Report abuse  
Picture of Jvisser Jvisser - 2009-01-06 19:12:11
Hi group,

I'm a Coldfusion person, and PHP is not really my best coding language!

I've been looking for a MIME parser, and after looking for some time I finaly found one that will work on the server that I'm using.
Running all the demo's that come with the package.

I have been trying for some time now, and test_message_decoder.php does also (for me) not show me how this can be done.
var_dump($decoded[$message]) does show all the needed data like

So.. Could some one here please exlain to me how I can get the ["from "] value in a string?
Same thing for the ["to:"].

Thank you and a happy new year!

  2. Re: getting the needed info   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2009-01-06 19:32:31 - In reply to message 1 from Jvisser
That is because you are seeing the output in a Web page. The addresses appear between < and > . So the browser thinks it is a an unknown HTML tag and does not show anything, but the addresses are there.

Anyway, what you need to look at is the ExtractedAddresses array entry that already returns the addresses and the name separately.

  3. Re: getting the needed info   Reply   Report abuse  
Picture of Jvisser Jvisser - 2009-01-06 20:04:53 - In reply to message 1 from Jvisser
Thank you for your quick reply.

re: That is because you are seeing the output in a Web page. The addresses appear between < and > . So the browser thinks it is a an unknown HTML tag and does not show anything, but the addresses are there.

Okay.. this is clear,and I did read about this already on the forum

re: Anyway, what you need to look at is the ExtractedAddresses array entry that already returns the addresses and the name separately.

Now here I'm really lost.
I've tried
echo var_dump($decoded[$ExtractedAddresses]); and
echo var_dump $ExtractedAddresses;
with no luck. (NULL)

I guess I need a lot more PHP time.

  4. Re: getting the needed info   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2009-01-06 20:17:00 - In reply to message 3 from Jvisser
Yes, you need to learn more PHP! ;-)

var_dump($decoded['ExtractedAddresses']);

  5. Re: getting the needed info   Reply   Report abuse  
Picture of Jvisser Jvisser - 2009-01-06 20:20:05 - In reply to message 1 from Jvisser
Pffff.. I was so close...

I guess I need to spend some more $ :-)

Thank you.. For sure I'll be back later with some more questions.

  6. Re: getting the needed info   Reply   Report abuse  
Picture of Jvisser Jvisser - 2009-01-06 20:35:38 - In reply to message 5 from Jvisser
hmmm.

var_dump($decoded['ExtractedAddresses']);
is still giving me a NULL

In Coldfusion it's so easy to set things like this.
<cfset "from" = myArray[1]>
I guess in PHP it's also, but at the moment not for me.

  7. Re: getting the needed info   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2009-01-06 21:31:37 - In reply to message 6 from Jvisser
You have to use that after calling the Decode function where the example var_dump call is.

  8. Re: getting the needed info   Reply   Report abuse  
Picture of Jvisser Jvisser - 2009-01-08 17:01:49 - In reply to message 7 from Manuel Lemos
Okay Got it working the way I wanted it.
What a great package this is :-)

Thank you for the package and help!