473,396 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Help with body parsing from an email

Using imap i must zap through emails in my email address, then saving
part of the message (the main body that is).
Question is, how am i supposed to read only the message's content,
ignoring all additional informations (charset and whatsoever?
I'm currently reading the text like this:
imap_body ($this->inbox, $i)
Fact if, that this way i get all other information

ex:
------------------------------- CONTENUTO DEL
BODY------------------------------------

------_=_NextPart_001_01C67B66.A8D1711B
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

charset=3Diso-8859-1">
6.5.7650.21">

P Programmazione per il web 430123

__________ Informazione NOD32 1.1548 (20060519) __________

Questo messaggio =E8 stato controllato dal Sistema Antivirus NOD32
http://www.nod32.it

------------------------------------- FINE CONTENUTO DEL
BODY-----------------------------
Now, what i'm interested is just the "P Programmazione per il web
430123" string, any lead about how to get that and only that out of the
message?
is there any imap method that can do it for me?

Thanks in advance.

May 20 '06 #1
1 4461
tim

[ Nicola ] wrote:
Using imap i must zap through emails in my email address, then saving
part of the message (the main body that is).
Question is, how am i supposed to read only the message's content,
ignoring all additional informations (charset and whatsoever?
I'm currently reading the text like this:
imap_body ($this->inbox, $i)
Fact if, that this way i get all other information

ex:
------------------------------- CONTENUTO DEL
BODY------------------------------------

------_=_NextPart_001_01C67B66.A8D1711B
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

charset=3Diso-8859-1">
6.5.7650.21">

P Programmazione per il web 430123

__________ Informazione NOD32 1.1548 (20060519) __________

Questo messaggio =E8 stato controllato dal Sistema Antivirus NOD32
http://www.nod32.it

------------------------------------- FINE CONTENUTO DEL
BODY-----------------------------
Now, what i'm interested is just the "P Programmazione per il web
430123" string, any lead about how to get that and only that out of the
message?
is there any imap method that can do it for me?

Thanks in advance.


I think imap_fetchbody will get what you want

Read the follow up comment by 'sales at nocwizard dot com' on
http://uk2.php.net/manual/en/functio...-fetchbody.php

Tim

May 20 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: dont bother | last post by:
Hey, I have been trying to parse emails: But I could not find any examples or snippets of parsing emails in python from the documentation. Google did not help me much too. I am trying to...
16
by: Chuck Amadi | last post by:
Sorry to bovver you again (again) here's script. I still can't see why the get_payload() doesn't produce the plain text message body of an emails in the testwwws users mailbox. As you can see I...
16
by: Terry | last post by:
Hi, This is a newbie's question. I want to preload 4 images and only when all 4 images has been loaded into browser's cache, I want to start a slideshow() function. If images are not completed...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
6
by: chris_fieldhouse | last post by:
Hi, I have a script for processing emails, The script finds email sent to a particular alias, grabs the body text of the email and stores it into a database. Problem is that certain character...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
3
by: binary_sunset | last post by:
Okay... so this may be all to obvious to all except myself, but I am having some difficulty with XML output from Adobe InDesign. Each separate article in my publication is tagged as an article,...
0
by: Gabriel Genellina | last post by:
En Thu, 14 Aug 2008 12:50:57 -0300, Ahmed, Shakir <shahmed@sfwmd.govescribió: I can't help with the part dealing with Outlook - but once you retrieved the email body, it's easy: import re...
0
by: Ahmed, Shakir | last post by:
Thanks everyone who tried to help me to parse incoming email from an exchange server: Now, I am getting following error; I am not sure where I am doing wrong. I appreciate any help how to resolve...
2
by: embz | last post by:
this post concerns three pages. 1. this page: http://www.katherine-designs.com/sendemail.php i get the following errors: a lot of it seems to deal with the PHP code i inserted to the page....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.