PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
i have problem with output of imap_body function
when i receive a mail with html form
i face to additional text around the main of message in email
for example :
i send a message(email) by outlook express with html format to my email that i want show by imap_body like this:
Hello World!
after send a email with outlook express
i use this code to view my email:
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I've never used imap before and yet I am able to tell you the answer to your problem in about 4 seconds. If you use the PHP Manual you too will be able to do the same.
hi
thanks for your guide
i use it and the additional text removed
but i dont get correct html like that it show in outlook express with attachments
in php manual there isnt good and complete guiding
without a exapmle for these functions: imap_fetchbody-imap_fetchheader - imap_fetchstructure
The IMAP functions seem to have a real problem fetching body parts when attachments are present. I finished up writing my own mail parser for this at work. I'd show the code but I cant because it's stuff from work. If you study the layout of an email body it should be fairly obvious how to parse it though.
You also nneed imap_qprint() to decode quoted printable messages and base64_decode() to decode base64 encoded messages.
your mind is this 2 function return correct view of html email
imap_qprint and imap_base64
and all of the mail that they received must input to these function to show correctly
what do you suggest for me to learn these functions
becuse i dont have find anything for that
if you can give just a example or sample php code for this work(means show currect html foramt with attachments) i can find out and learn these code
in php manuel i cant find a example for these functions or all of the examples exist doesn't work correctly or doesn't completely