Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-16-2008, 05:23 PM
Junior Member
 
Join Date: Apr 2008
Location: USA
Posts: 3
Default fetch an email address

I have been looking all over for the Zend_Mail call to fetch the email address from an IMAP account. When I call the Zend_Mail_Storage_Imap class and create an object mail...I can use header calls to fetch values.

example:
$message = $mail->getMessage($messageNum);

// output subject of message
echo $message->subject . "\n";

This works fine....
what would i use to fetch the email address
When I use from....I get the Name of the sender not the email address...

thanks ahead of time

Cary Woods
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-16-2008, 05:45 PM
Elemental's Avatar
Senior Member
 
Join Date: Jul 2007
Posts: 119
Default

$message->from should work.

If I'm not mistaken the Zend_Mail_Message works with Zend_Mail_Part and creates a property for each part of the mail. So $message->to would also work.

If they don't work you should be able to grab any parts of the header via $message->getHeader(part,format); where part is the header part you want and format is either string or array. the body is available via $message->getContent(); Also any parts of the message can be retrieved with $message->getPart(); or some such.

see the api docs and reference manual for more details.

Last edited by Elemental : 04-16-2008 at 05:48 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-16-2008, 11:18 PM
Junior Member
 
Join Date: Apr 2008
Location: USA
Posts: 3
Default from gives me the name not email

so if the email address is joe@joe.com and the name is Joe Smith
"from" gives me " Joe Smith" and I would like to get joe@joe.com...thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:07 AM.