Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





How To Read HTML Email Text?


I've done a couple of hours web-searching without turning up many
answers so far, and I guess I could figure it out (eventually) from
the MIME format, but here goes with my question...

I don't have any problems reading text emails, but can anybody direct
me to some PHP source code that will read (the text inside) an HTML
email, specifically the "From", "Subject" and especially the message
body?

I would like the code to be able to differentiate between (i.e. know
that it is) a text or an HTML email, and I would like the code to
ignore any attachments.

I don't expect the incoming email to have any (or large) attachments,
but I hope that any code samples can handle the possible case of big
attachments coming along for the ride.

Incidentally, if I did (not this time) want to handle large
attachments, can PHP and/or servers handle megabytes of data being
read into a string variable through fread()? I'm just getting into
this stuff, and not sure of what areas would be a resource and/or
performance hog.




View Complete Forum Thread with Replies

Related Forum Messages:
PHP HTML Email Doesn't Format The Text Using The Html Tags
I had a PHP script that sent an html email from a Flash form. It was all working on a Windows based server. Then my server was switched to a Linux based one. It now sends the email, but has a lot of random characters and doesn't format the text using the html tags. Code:

View Replies !
Html Text In Email
i want to send them in mail. and wanted to display them as a html page. i have tried but in mail it displayed the html code not the result.

<table><tr><td> jkshio sv9puips opi opg pgig g <a href ="to link </a> some bold <b>text will be here </b></td></tr></table>


View Replies !
Displaying Text/html In Web POP Email
is it possible that message from web POP mail ( through sockets) appears as html (or text) if it is sent as html, not to appear like source file of the html document? I use web POP mail which is not mine and it displays without problem emails sent as text/plain but shows complete source with all tags if the email is sent as text/html, in other words, it´s useless and very hard to read for user.

View Replies !
Sending Text And Html In One Email
i've put close to 10 hours into this today and i'm not getting results. i simply want to create and send emails that can be viewed by both text based and html based email clients. i've scoured the PHP manual and related comments and nothing is working. I also don't want to use a big bloated open source library as my needs are simple...text...html...that's it. 

can someone point me to code that's working for them (across all popular email clients) or to a tutorial that actually works?

View Replies !
Sending Both HTML And Plain Text Email.
I am using php to send weekly newsletters to my mysql database, the emails are always in HTML only.

I was wondering if anyone knew how to send both types so that if they can't view HTML emails it will show just text?

View Replies !
Problem With Sent Text/html Email + Attachments
I send a newsletter from script online. Email is sent in txt and html format, and this is ok The problem is with the attachment. I see and can open attachment ONLY in outlook express I copy below header's email Code:

View Replies !
How To Send A Plain Text Version Of An Email With Html
how can u send a plain text version of an email with the html so that
the users mail client can access this plain text version?

View Replies !
Email With Attachment - Annot Be Accessed. The File May Be Read-only, Or You May Be Trying To Access A Read-only Location.
It is a basic email with an attachment. The email and attachment are getting sent and received ok. When the recipient tries to open the attachment, the right application opens (eg. Excel) but then throws up an error. I am using base64 encoding. For example:

.xls file with base64 encoding:
'testing.xls' cannot be accessed. The file may be read-only, or you may be trying to access a read-only location. Or, the server the document is stored on may not be responding.

.pdf file with base64 encoding:
There was an error opening this document. The file is damaged and could not be repaired.
so the file isn't being decoded right. I have tested on Yahoo and Outlook. PHP Code:

View Replies !
Read And Display Japanese Text From Text File
I posted a question regarding reading japanese
text from a text file.

Well, since I solved the problem, I thought I'd post my solution for
the benefit of other people with the same problem.

The plan was to make a script to read and display japanese text. I
will use it for making a japanese proverb script and for a japanese
language study script.

Method :

I wrote a simple kanji text file (saved with UTF-8 encoding)
I wrote a simple PHP script to display the file contents (saved with
UTF-8
encoding)
I specified the content-type header for the HTML page :
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

*** All files have the same encoding. ***

UTF-8 supports japanese characters.

and it works!

this is my PHP (and HTML) script :

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>PHP : Japanese Text File Read : Exercise 1</title>
</head>
<body>

<?php

$filename="japanese.txt";
//open file
$fp = fopen($filename,'r');

//loop through each line in the file
while($line=fgets($fp))
{
//output current text file line
print $line."<br>";
}
//close file handle
fclose($fp);

?>

</body>
</html>

I know it's a very simple script, for testing purposes only. It
displays the contents of the japanese text file line by line.

The key was to save all files in the same encoding (I used UTF-8) and
to specify the encoding / charset in the HTML header (<meta
http-equiv="Content-Type" content="text/html; charset=utf-8">)

View Replies !
If An Email Sent Is Just Read
I'm working on a mailing list but I don't figure out the way to know if the email is just read. Is there a way to find it out ?

View Replies !
How To Know When My Email I Have Sent Gets Read
How to know when my email i have sent get read in PHP. What i actually want is that i am sending mails to our clients through PHP. I want to know the email id of that person, when he reads my mail. I don't want to redirect my client back to our server for capturing his information.

View Replies !
Need Email Address From Submitted Html Email Form
I have an html email that contains a form with questions for the user to fill out. Without asking the user to re-input there email address into the form, is there a way for me to grab the email address its coming from when the user submits the form to the php processing program. I need a way to match the questions to the user when they submit the form.

View Replies !
Read Email With Fsockopen
I am writing a PHP-GTK app and I dont have access to php-imap. So have got an fsockopen to connect to my imap server, but I dont know how I would read an email on the server.

can I pass the server some commands?

View Replies !
Function To Read Email
I looking for function to fetch my email and add it to my vBulletin ( support forum ) automaticly so any one have this function ? I Need email subject & date & sender & body only.

View Replies !
Can't Read Email Attachment
I have used all the pre-written email sending scripts on the net and they all send the email with the attachment just fine. When I try to open the attachment in Outlook the attachment is there with the correct file size but it seems to be corrupted. I have tried many different attachments. The script is attachted I found the easiest to use, but it won't work along with others.

View Replies !
Read Email Inbox
User scans a document in and sends the document to a mailbox. I then need a script to log into that mailbox every x minutes to check to see if there is any new emails. If there is I need to download the attachment to a location and then once the file has been saved succesfully, i need to mark it so it wont get read again.

The purpose of this is so that I can then display these PDFs on an intranet page so that users can view the documents, i would prefer it to be all automated instead of me going through the inbox manually and moving them myself. I have had experience in sending emails with attachments, but never reading them and saving the attachments.

View Replies !
Email Read Verify
if it is possible to verify if an email has been opened using php? say for instance upon loading an image or something. how would this be implemented?

View Replies !
Email Read Verification
if it is possible to make a email read verification method using php. i was thinking something like adding a image to an email and somehow get a script to update the number fo times the image has been loaded. what then if the email receiver does not support html?

View Replies !
Email Read Confirmation
i have a free account wiht yahoo, but it does not offer me email confirmation. i need to send out some material that i would like to know if has been read. is there any way i can do this using php and hmtl. yahoo does support html.

View Replies !
Receive - Read Email
Can anyone point me in the right direction? I want to use Php to automate confirmation of someone joining an email list by them replying to an email (so they don't have to have a browser?).

I will probably use a hyperlink with a unique ID, but I also want to know how to go about reading from a mailbox with Php so I can use an email reply method, too.

I'm having trouble finding any kind of tutorial. From the bit of searching I've done, it appears I need to use an IMAP client and the IMAP functions (I've no experience with using IMAP, but could learn).

Can I use Php functions to read email from a POP3 mailbox?

View Replies !
HTML Email Using PHP Problem (Receive Html Tags)
When I send the html email, the only thing I receive is the tags (the
html codes basically). I want to be able to see the email like a html
page, what is wrong with my code? Here is a copy paste of it.

$HTML = "</html><body><img src='http://www.somewebsite.com/
someimage.jpg'></body></html>";

$headers = "From: $from
";
$headers .= "MIME-Version: 1.0
";
$boundary = uniqid("HTMLDEMO");
// Now we attach the HTML version

$headers .= "--$boundary
".
"Content-Type: text/html; charset=ISO-8859-1
".
"Content-Transfer-Encoding: base64

";

$headers .= chunk_split(base64_encode($HTML));

mail($to,$subject,"",$headers);

print "mail Sent<br>";

The email I receive has this as text:

</html><body><img src='http://www.somewebsite.com/someimage.jpg'></
body></html>

View Replies !
Get Status Of Email (read, Unread)
I am using sendmail as mail server. Now I wanna to differenciate read and unread email when users log on to my webmail system. I wonder is there any IMAP functions that allows me to get the status of all emails i.e. read and unread .

View Replies !
Verify If The Email Sent Is Received Or Read
Is there any way to know that if the sent email is received or read at the received end?

View Replies !
How To Track How Mamy Read An Email
how to track how many opened an email i sent them? (Conducting a survey and need to track how many at least opened it)

View Replies !
Read Email On Pop3 Without Imap Ext
we need to check email on email address as a webmail but more simple. We need only to check if subject is "Remove" and if yes make action with sender address. The problem is that in server where hosted site IMAP is not active.

View Replies !
Inserting Adsense Code - Html Program That Automatically Coverts All My Text Files To Html Webpages?
I've purchased a text to html program that automatically coverts all my text files to html webpages within a template, but the only problem is how do I insert my adsense code into all 250 pages? I've seen articles regarding PHP includes for page templates, but I'm not sure how this would work inserting my code.

View Replies !
Send A Email With Html As Well As Php.sending The Email
im trying to send a email with html as well as php.sending the email is the easy part.the problem is with the message part.if i put this code in the textarea it display the html tags in the email.yet the php is fine. Code:

View Replies !
How Can I Read Text From PDF Files?
Can you someone tell me how can I read text from PDF files?

View Replies !
Q: Read Text With VBA From A PHP Web-page
I created a page on our intranet that shows a number and that
increases for every time the page is opened. It is similar to a
visitors-counter.
When I look at the page with Internet Explorer it works just fine.

Now I want to read this web-page from a MS-Word macro and include the
number as a company wide unique id in my MS-Word document.
Unfortunately, the PHP script doesn't update the counter when I call
it from my MS-Word macro.

How can I force PHP to update my counter when I call it from a VBA
macro?

I am using the following code:

View Replies !
Read Text File
i need to read a text file n extract the text into a variable for later use for each row of text. i know this sounds like an easy tasks but i have been having trouble over it. i keep receiving 'array' instead of the actual text in my text file. example of wat my text file looks like :

hello world1
hello world2
hello world3
hello world4
hello world5
hello world6
hello world7
hello world8
hello world9
hello world10

View Replies !
Read In A Text File
I'm looking at reading a text file into a webpage using the INCLUDE command, however this text file will have no html formatting at all, just a couple of paragraphs. The problem is HTML will see this as one long line of text and not see the start of a new line and paragraph unless you put in the html code needed. Hence my problem. I remember a command which would output this differently and solve this problem but it was a long time ago.

View Replies !
Read In Text File
I've got a web page where I'd like someone other than me to be able to upload a .txt file (with that week's headlines, etc) and display it on the web page. That part works - easy - but how can I format it a little better? Or is there a better way to execute what i want to do? Below is code I'm using to read file in -

<?php $file="varsity.txt";
$fp=fopen($file,'r');
$content=fread($fp,filesize($file));
fclose($fp);

//Then, add a <p> to the beginning, and a </p> to the end, and use
//str_replace to replace all char(10) (new lines) with </p><p>

$content = "<p>".$content."</p>";
$content = str_replace(chr(10),"</p><p>",$content);

//Then output the variable:

echo $content ;?></div>

View Replies !
Read Text Dile
i want to tak a text file which is a table and take the contents of each sell and add to a database here is what i have:

// open the text file and read the entire file into $filegets.
$handle = @fopen('mytextfile.txt', "r");
if ($handle) {
while (!feof($handle)) {
$buffer = fgets($handle, 4096);
$filegets = $filegets . $buffer;
}
fclose($handle);
}
// extract from start of table to close of table
$start = "<table border=0>";
$end = "</table>";
$tmpget = explode($start,$filegets);
$result = explode($end,$tmpget[1]);...

View Replies !
Read From A Html Site
I want to read a html site on the net. And the php script must catch (or better parse?) all the data between <td> </td> to put it in a txt file. Can anyone of you help me out?

<TABLE bgColor=#cccccc border=1 cols=5 width="100%">
<TBODY>
<TR>
<TD>Gabler Joachim</TD>
<TD>&nbsp;</TD>
<TD>Goethestr. 5, 14163 Berlin</TD>
<TD>&nbsp;030-809729-0</TD>
<TD>&nbsp;</TD></TR>
<TR>
<TD>Gabriel Christian</TD>
<TD>&nbsp;</TD>
<TD>Otto-Suhr-Allee 97, 10585 Berlin</TD>
<TD>030-3416024</TD>
<TD>030-3419042</TD></TR>.

View Replies !
How Can I Get Php To Read A Html Extention?
I would like to get php to parse a regular .html page. I just don't know where and which file I need to edit to add the html?

View Replies !
How To Get .html/.htm Extensions Read As .php
I have a site with a lot of preexsisiting links/pages that are of the .htm, .html extension but they need my basic php functions added to them.  Anyone know how i can get them read as .php without having to rename every page and link?

View Replies !
Read HTML Or TXT File
Does anyone know if this is possible? Script reads a HTML file or a TXT file and output the data to MySQL database.

View Replies !
Read An HTML Page
It may sound kind of crazy, but I'm trying to see if there's a way php code can 'read' contents of a static HTML page and store the contents into a variable. Is it possible? If so, how?

View Replies !
Read Html Table With Php
how to read an html table with PHP and parse it. I have numerous web pages, each containing one html table and with one .gif graph.

I want to parse the html table and insert as a record into mysql. Unfortunately, it is not in XML which would make this easier.

View Replies !
Read File With Html
I have a PHP program that throws some text into a file.

Later I display it using the code below (php and html).

But I'm trying to hop up the code a little and would like to bold/blink/underline just a few lines of the output.

I've inserted the
HTML Code:
<b> xx </b>
into the file along with the text at selected points.

When it reads it it just puts HTML Code:

</b> </i> </blink>

right onto the screen.

PHP Code: ....

View Replies !
Simplistist Web Based Email Read-only For Group
I'm wanting to add functionality to a website...This is for a kids sports
team - would like ability for Team Managers to be able to send email and
have it automatically show up on website "Inbox" for all players parents to
be able to read (Read-Only).

I have the IMAP part down and can capture the
email but am looking for some existing script to add webmail type appearance
without all the bells and whistles - although the ability to handle
attachments would be nice. No email creation, delete etc. - need to
specifically setup users (or Admin only) for that (as an option).

View Replies !
Formatting Text - Read More .. Link
I am currently looking for a way to have text that is entered in my news service (it is added to a databse, then displayed) to be cut off after a certain length on some pages (mainly the front page)...kind of like what you see on some sites with the "read more" at the end. I want it so i could enter a long news/article update, then on the home page it would be shortened, and when the user clicks on the title, it takes them to the detail page with the full length article. I am using dreamweaver, if that makes any difference.

View Replies !
Text File Read / Write
im trying to make a poll that uses a text file for storing totals, and...well its not working. I have a text file with 5 values seperated by semicolons, like 1;2;3;4;5, and that file is poll1.txt. If I supply the script with an option, it will succesfuly read and show the contents of the file, but when I try to change one of the values and put it back, it fails. It writes to the file with loads of black squares and more semicolons than are in the $newresults variable. Follows is the incorrect code:

View Replies !
Read Text File And Store In DB
Is it possible to upload a text file, read the contents and extract certain strings, words, phrases, etc. from it and store it in a mySQL database for later searching via the web? If so, are there any scripts/modules out there that accomplishes this?

View Replies !
Read And Write To A Text File
San someone supply me with a PHP script to read and write to a text
file on the server

View Replies !
Read Line From Text File
I have a text file that i would like to use PHP to read from. each line
ends with a. I need to read from the beginning of the line, only upto that:

right now i'm using this, which is sloppy and slow:

if ($chr = fgetc($file)) != "") { }

which of course reads in one byte at a time till the end of line. is there
a better way?

View Replies !
Read And Write To Text File
I am trying to do a simple thing: read a line from a text file and write this line to another text file. The problem is: when I write the text into the new file there is an empty space between each characters. EG my original line is abcdef and the result is: a b c d e f  &#8299;. I tried and tried, searched google, but I am stuck... How can I read line n from one file and write it to another file exactly the same?

View Replies !
Read Variables From A Text File.
this is a simple question, but it has such a major importance on how my script will turn out. I am trying to make a hub, in which website names are stored in text files (1 - unlimited numbers).

I am trying to see if there is a way that PHP can read the variables stored in a text file. For example. in a text file I have the varable

$site = "http://google.com";

and in my php script it would open up the text file and then read the variable $x from there it would echo

Site is http://google.com

is all of this just wishful thinking, or is there such a way to make this really exist.

View Replies !
Read Text From Jpeg/jpg Image
Is there any image recognition script out there that can help me read text from a jpg image.

View Replies !
Read And Display Text File
I have a web site that has a text file indicating the results of golf, tennis, and swimming events. I would like to scroll those results on the web page by reading the text file and simply scrolling it to an area on the web page.

View Replies !
Setting Text Field To Read Only
I have a form which, based on some DB lookup factors, sets a series of text fields to disabled or enabled. Code:

View Replies !
Read Text File, Problem
i'm reading in a text file and found a major problem, it seems that the txt file is saved as unicode, its a chat log which i want to read in and display.

However because its saved as this format, there is a space after every character, you only see this though when doing source code view.. but appears normal on the webpage..

Is there a way to read the file in another format.. etc..

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved