Email And Mime Help
What is the proper format?
as long as I have the tag $headers below
html works in sending emails but the from line looks like this:
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
MIME Email Formatting?
Ok so I finally figure out my form letter but I'm still having a formatting issue. When I submit the form and send to my aol.com test email address everything looks fantastic. When I send it to my regular email address off my domain it come over in text showing all the html code. I'm using Outlook 2007 to view that email and the aol email. Just for background purposes... This form collects a date (the variable) and enters it into an HTML file. Then it sends the merged results to the email entered into the form. Here is the code:
View Replies !
View Related
Email MIME Types
We built a site last year with a HTML email facility. It was working beautifully - pulled info out of a database and personlised the email. It has images etc etc and looks great. I set up an facility so that I would receive a copy of these emails just to track its usage. Code:
View Replies !
View Related
PHP Mime
I am printing results from a database query. I have set the results in a format. I want to run PHP from the browser and get the results in the format I have specified. I am trying to set the mime.
View Replies !
View Related
Getting The MIME Type
I know this is easy if youve just uploaded a file using a form but suppose the file already exists on the server. Is there a function that can be called that takes the filename and returns image/gif or whatever.
View Replies !
View Related
MIME-TYPE
I've written a file upload script and want to check the MIME-TYPE of the uploaded files. I've made use of the many posts and come up with the following: // Check file type from MIME $allowed_types = array("application/zip", "application/x-zip", "applicatoin/x-zip-compressed", "multipart/x-zip", "application/x-stuffit", "application/x-stuffit-compressed", "application/sit", "application/x-sit", "application/sea", "application/x-sea", "application/pdf"); if(in_array($file_type, $allowed_types)){ $error = 0; } else { $error = 1; $error_msg .= "<li>The file type you are uploading is not allowed. Compress all files ". "into ONE (1) archive with StuffIt or WinZip. As an alternative you may ". "create a PDF file to upload. Consult your software documentation ". "for more information. MIME-TYPE not matched.</li>";} I cannot seem to get a match from any file types in the allowed_types array.
View Replies !
View Related
Mime Problem?
I have a php script that under some circumstances causes my browsers to prompt me to open or save the file. The file is an index file, index.php. When I try to open it from the root of the domain. domain.com (or www.domain.com), I get a dialog box asking if I wish to open the file or save it. If I open any other PHP script in the root of the domain, it parses and works properly. If I open the file from a sub domain, sub.domain.com, it works properly. If I open it locally (XP Pro SP2, Apache 2.0.48, PHP 4.3.4.), it works properly. If I open it on another machine, it works properly. Clearly, it has something to do with my machine, but given the limited circumstances under which the problem occurs, I'm struggling to figure out what the problem might be.
View Replies !
View Related
Mime Parser
i am trying to decode a raw email, i succedded to get the headers such as the from & to & subjects field but i seem to have a problem extracting the attachment. does anybody has a clue how to check if there is an attachment & how to save it in a directory?
View Replies !
View Related
Mail() And MIME
I have a multi language website. Sometimes users send messages to us via the online contact form. This uses the mail() function in PHP. The problem is, when chinese or korean is in the subject, the from and subject data is lost. Actually it is fine in gmail, yahoo mail, thunderbird and everyones email client except my companies local email client (Eudora, japanese version). So for everyone else it is ok, only us here get the lost data. I dont know if this is caused by our homemade anti-spam program or Eudora or something else. The systems guy said its a bug in my code, which is think is dubious. Something about the MIME type not being set correctly etc.
View Replies !
View Related
MIME Stuff
I have a db full of headers / body of emails,i need to get all the info from it such as attachments. Anyone seen any classes around that do this, all i can find are ones that connect to the pop box an do it. whereas i have this data in the db already.
View Replies !
View Related
S/MIME Over HTTP
The thing im trying to do is transport encrypted data to a client browser (which will have the private key certificate in PKCS12 format). I want to be able to be sure that the client is who it says it is, and that this data is transferred encrypted with only the client having the private key being able to decrypt it. The problem is i dont have access to httpd.conf in this case, which would have been a posible solution. My next idea was therefore to use S/MIME over http where in the client browser IE it has a installed certificate in PKCS12 format (thus having private key access). I believe IE has support for S/MIME, and i guess this needs some sort of programming of the http headers sent (through headers() function).
View Replies !
View Related
Mime Type
When I upload a file I can check the mime type from the $_FILES array which is great for making sure that the files being uploaded are of the correct type, the files are being uploaded to a directory off root but you can never be too carefuly. The problem is, these files are very large but because they're just basically text (xml & csv files), they're very small when zipped up, so I allow zip files too - if a zip is detected then the system unzips it to a temp directory - but is there any way to detect the type of file that came out of the zip. It would be pointless to do all this checking of file type but allow them to upload anything in a zip.
View Replies !
View Related
Mime Types - IE
I'm having a problem with Mime Types in IE. Now on my machine I have no problem but our clients - who incidentally are using the same version of IE and XP as we are are having difficulties. The mime type that IE is sending is different on their machine than on ours. Its identifying a csv as an excel file - application/vnd.ms-excel now if I allow that then it will allow xls files as uploads - which we dont want. I dont know what to do or what to suggest to the clients.
View Replies !
View Related
MIME Types - IE
I have a script that checks the mime type of uploaded files before handling them, this works fine in FF, it checks for text/tab-separated-values, text/comma-separated-values, text/plain, text/xml, application/zip but ie is sending files through as application/octet-stream... is there anything I can do about this other than allow application/octet-stream?
View Replies !
View Related
MIME Types
I have a script I've downloaded (I do intend to learn PHP eventually, but this needs to be done ASAP!) which uploads 4 files into a folder on my server. I've specified the MIME file types it needs to upload, and most of them (except image/png) work in Mozilla Firefox. I tried MSIE: image/jpeg doesn't work. Opera: png works, application/zip doesn't. If someone can tell me what's wrong, I'll be the happiest person alive (well, almost!). You can call me stupid, I don't care. Code:
View Replies !
View Related
Mime Message
I have been trying to send mail with an attachemnt and have run into a problem with the message body. I have tried using both mime_mail and sendmail classes and can use both to send emails with attachments successfully, but for some reason I can not get the message body to appear. I am currently using sendmail and have the following code to store the attachment and send the email: PHP Code: include_once ("inc.upload.php"); include_once ("inc.sendmail.php"); $file = $_FILES['fileUpload']; $name = $_POST['name']; $to = 'emailAddress' $to_title = 'Company Enquiry' $subject = 'Company Appointments Enquiry - from company.co.uk' $header = '' $Upload = new Upload(); $Upload->setTheFile($file); $Upload->setFilePath("uploadedFiles"); $Upload->setMaxFileSize("3000000"); $Upload->setAllowedTypes(array("application/msword",
View Replies !
View Related
Sending A MIME Message
I failed to send a MIME Message with attachment file. The following code I used was crashed my Apache Webserver. The code works if I removed the attachment 'part'. Any clue? note: Im running it under a Windows Platform. PHP Code:
View Replies !
View Related
Mime Type Question
I have built a form that uploads a file into a directory. Everything works great when i dont validate the form but I have to validate the file type. The only mime type that i could find for an .xlt file is application/vnd.ms-excel only problem is that i can only upload a .xls file with that mime type. does anybody have any ideas on this? PHP Code:
View Replies !
View Related
Mr. Heyes' MIME Class
I have a quick question concerning the use of Richard Heyes' MIME mail class. I am attempting to attach a PDF file that I have created using PHP to an email which I need to send from a web page. I am trying to do it using his MIME class, but I cannot seem to get even the examples he includes with the class to work. When I try to use them I get this error: Array ( [0] => Unable to relay for mlb@mlinteractive.com [1] => No valid recipients ) I assume this means that it thinks the email address is invalid, but I have tried it with several others and gotten the same results. The only thing I changed was the reciever, everything else is the same. I have no experience with mail servers though, so I have no clue what could possibly be going on. (It doesn't help that I'm new to PHP as well).
View Replies !
View Related
MIME-TYPE Issue?
I wrote a script that creates an email with 2 attachments. The PDF-attachment is no problem at all. The second one is supposed to be a message, which then can be opened and sent from any mail program. Now I ran into trouble... The script and everything works fine using Outlook as reciepent. Netscape 6.2. just doesn't seem to recognize the attachment and opens the browser instead of the mail application to show it's content. I'm aware that this might not be a PHP-related problem. PHP Code:
View Replies !
View Related
Wrong Mime Type
I tried to reply to another post, and instead of receiving html, my browser came back with a mime type of x-something-php and prompted me to open/save the document. I tried several other links on the page, got similar responses, restarted the browser, tried others... It seems to be working properly now, but I'm currently in possesion of two of devshed's php scripts. So my question is, what happens when my server does this and database passwords/schema information/obscene comments whatever are exposed to user download? Is this a known issue? What could cause this to happen? I'm using mozilla 0.9.8, but this seems like a server -side issue to me.
View Replies !
View Related
Mime File Types
Tryed to get $picture_type for uploading only .gif and .jpg files on my serever. Problem that only .gif files can be uploaded, on all other types it shows "wrong file type". Tryed to do this in 2 variants: Code:
View Replies !
View Related
Mime Part Numbering
IMAP_FETCHBODY requires the "part number" to fetch. how the part numbers are derrived. for example, here is the formatted parts array from a message: Parts: array(2) { [0]=object(stdClass)(12) { ["type"]=int(0) ["encoding"]=int(0) ["ifsubtype"]=int(1) ["subtype"]=string(5) "PLAIN" ["ifdescription"]=int(0) ["ifid"]=int(0) ["lines"]=int(1) ["bytes"]=int(38) ["ifdisposition"]=int(0) ["ifdparameters"]=int(0) ["ifparameters"]=int(1) ["parameters"]=array(2) { [0]=object(stdClass)(2) { ["attribute"]=string(7) "CHARSET" ["value"]=string(10) "ISO-8859-1" } [1]=object(stdClass)(2) { ["attribute"]=string(6) "FORMAT" ["value"]=string(6) "flowed" } } } [1]=object(stdClass)(15) { ["type"]=int(2) ["encoding"]=int(0) ["ifsubtype"]=int(1) ["subtype"]=string(6) "RFC822" ["ifdescription"]=int(0) ["ifid"]=int(0) ["lines"]=int(34) ["bytes"]=int(1609) ["ifdisposition"]=int(1) ["disposition"]=string(6) "INLINE" ["ifdparameters"]=int(1) ["dparameters"]=array(1) { [0]=object(stdClass)(2) { ["attribute"]=string(8) "FILENAME" ["value"]=string(21) "TEST OF HTML MAIL.eml" } } ["ifparameters"]=int(1) ["parameters"]=array(1) { [0]=object(stdClass)(2) { ["attribute"]=string(4) "NAME" ["value"]=string(21) "TEST OF HTML MAIL.eml" } } ["parts"]=array(1) { [0]=object(stdClass)(12) { ["type"]=int(0) ["encoding"]=int(0) ["ifsubtype"]=int(1) ["subtype"]=string(5) "PLAIN" ["ifdescription"]=int(0) ["ifid"]=int(0) ["lines"]=int(10) ["bytes"]=int(251) ["ifdisposition"]=int(0) ["ifdparameters"]=int(0) ["ifparameters"]=int(1) ["parameters"]=array(2) { [0]== object(stdClass)(2) { ["attribute"]= string(7) "CHARSET" ["value"]= string(10) "ISO-8859-1" } [1]= object(stdClass)(2) { ["attribute"]= string(6) "FORMAT" ["value"]= string(6) "flowed" } } } } } } ["value"]=> string(6) "flowed" } } } } } }
View Replies !
View Related
Who Is Reporting Mime Type?
I have a PHP form that is used to upload files. When a file comes in the _type value indicates text, HTML, or msword--all fine. Things still work if I eliminate the file extensions on the .txt or .html files. Even if I switch them around. But if I remove the .doc from the Word file, I get "application/octet-stream". Who is reporting this? The client browser? Apache? Is it looking at both the file extension and contents for certain files? Where can I go to find out more information on this? I'm concerned about non-Windows OSes, older browsers, etc. And it would help to know how intelligent the creator of this valuable text field is.
View Replies !
View Related
Setting My Own MIME Types
My server allows for setting custom mime types through htaccess, using this line: AddType [mimetype name] [extension] I am trying to set a custom mime type for files with ppf and sppf extensions, so I am using this: AddType application/halo2-ppf ppf AddType application/halo2-sppf sppf Am I doing something wrong? I added this to my top level htaccess file, it didn't work, so I added i to a htaccess file in the folder where the upload page is, and it still didn't work, am I doing something wrong?
View Replies !
View Related
MIME-Version Insert
Like so many others, my contact form is being hit by spammers doing email header injection. I've scoured the web trying to come up with a solution, and have implemented several things including sessions. But I'm stuck on the following block for when MIME-Version is inserted. Actually the following works if I manually enter every post field (i.e., Name, Email, Message): if(eregi("MIME-Version: ",$_POST['Name'].$_POST['Email'].$_POST['Message'])) { mail("contact@domain.com", "Form Hijack Attempt_b", "A spam relay was attempted from the Web site and was blocked.", "From:SpamMonitor"); die(); But is there a way to consolidate the numerous post fields into one? I saw this somewhere, but it doesn't stop the injection like the code above does: if(eregi("MIME-Version: ",$HTTP_POST_VARS)) { mail("contact@domain.com", "Form Hijack Attempt_b", "A spam relay was attempted from the Web site and was blocked.", "From:SpamMonitor"); die();
View Replies !
View Related
PEAR's MIME Mail
I've created a cron that emails me (as attachments) the week's DB back ups. The problem is that they're GZ files and while I've used PEAR's MIME Mail class before with sending images and so on, with a GZ'd file, it seems to print all the data in the email rather than attach it! Any ideas? Would it help to give the files a new extension?
View Replies !
View Related
MIME Type Of Mp3 File
I'm uploading mp3 files and ofcourse checking the MIME type, and I would expect that the MIME type would be audio/mpeg or audio/x-mpeg. But, instead of that it recognizes the mp3 file as application/octet-stream. How can that be? I deffinetly not want to allow that type as it would create a mayor security issue. checking for extension is also no option; that's easely bypassed. Does it have something to do with de ID3v2 information in the beginning of the file? i know octet has got something to do with 7-bit stuff, and in ID3v2 tags are syncsave using 7-bit bytes.
View Replies !
View Related
MIME Typs Not Working In FF
I am having some issues with MIME Types, For some reason everything works fine in IE But in FF i am unable to use application/vnd.ms-excel And application/msword It does not seem to recognize the content in Firefox These are being used to Upload content to a SQL DB Any ideas on what i am doing wrong? i have tried all the MIME types that i can find for XLS and none of them seem to work in FF
View Replies !
View Related
MIME Problem With AddHandler
I'm using Apache with php, and attempting to have an HTML file parsed as php. It's a legacy page with a high PageRank, and the client wants it kept around. I did the "standard" thing. created a .htaccess file with the line: AddType application/x-httpd-php .php .htm .html This does have an effect, so I know the htaccess file is found and interpreted. However, what I see happen with a page is: The browser opens the "don't know how to handle this type" dialog asking whether the file should be saved, or an app started to handle it, etc. This implies to me that the mime type *has* been changed, however, the php parser is still not given a chance to interpret it. Has anyone seen this before?
View Replies !
View Related
OOCalc Mime Type
I want to open HTML table with OOCalc from Firefox and I used header("Content-Type: application/vnd.sun.xml.calc") I think its a correct mime type for OOCalc, but why Firefox does not recognized it and always triggering OOWriter to run. I tried mozilla with the same result as Firefox. Is there any other mime type for OOCalc ? are there any way to force firefox/mozilla to open openofice document in their (OO) original windows not in firefox/mozilla windows ?
View Replies !
View Related
MIME-Type + Form
I get this message after submitting my php contact form. Why is this? MIME-Version:... List:; syntax illegal for recipient addresses Content-type:... List:; syntax illegal for recipient addresses Here are my headers: PHP Code: $headers = "MIME-Version: 1.0"; $headers .= "Content-type: text/plain; charset=iso-8859-1"; $headers .= "From: '$name'"; Also how do I ensure that the from field will be the senders name?
View Replies !
View Related
MIME Attachments Stored In MySQL
I am parsing a mailbox using the imap functions, pulling out images attached and putting them into mySQL as BLOB fields. I am having problems displaying images once they are stored in mySQL, and I think it may be related to the way I store them. The following line of code is called after an attachment has been identified as a GIF attachment: $rawimage = addslashes(imap_fetchbody($mbox,$m,$part_c)); ....where $mbox is the imap link and so forth. Testing to make sure I am actually pulling info out, a debug line like: print_r($rawimage); ....displays a bunch of chars that are the image attachment data, and a line like: print_r(base64_decode($rawimage)); ....displays other, different chars. Looks good so far - I'm definitely pulling images out as raw data. So I INSERT the $rawimage into my blob field. However, on the display page, I send the headers like: header("Content-type: image/gif"); [get image from database and store it in a var called $image_from_db] echo $image_from_db; But I get a broken image... So I try print_r($image_from_db) on this page (after removing the header line) and it looks like the chars from the tests before - it's the same data. base64_decode($image_from_db) does not make the image display properly, either, but printing it as such shows all those chars again. I think I do not understand how base64 encoding and addslashes works between MIME, php and mySQL. Anybody have any ideas? How should I format the data when I pull it out of MIME (in terms of base64 decoding), how should I insert it (addslashes is correct?) and how should I echo it when I pull it out into the displaying php image generation page?
View Replies !
View Related
Fetching And Managing Mime Mail
Is there a nice tidy php class that will allow me to fetch mail from a pop server and break up and retrieve the different mime parts and such... that is at a higher abstraction than the more simpler imap_ routines found in php? Basically I want mime and pop/imap management past the simple facility provided by php.
View Replies !
View Related
Obtaining File Mime-type
Does php have a way of obtaining a file mime type other than for images? I'e, a user may upload an image or a short movie clip, i need to know how to deal with it without having to rely on the file extensions. Script may be installed on a windows machine so file() is out of the question unless windows as an alternative to file().
View Replies !
View Related
MIME Mail Headers (date)
i am trying to edit my email headers fo a simple email to manipulate the date field ,ie: i want to set the date the email was sent and when the client displays the date it will show up as the date i used , i have tryed a few fields but none seam to work correctly. what will happen with this is that say i sent the email to a hotmail account it would display in the list the correct date it was sent on but once opened the date field will show the date i have entered. is there a correct way to do this so in the main list it will show as if it arrived on the date i sent it ??? PHP Code:
View Replies !
View Related
MnoGoSearch Mime Type Problem
I am doing a Document Management System. All the uploaded docs are stored in a directory, but the names ae encrypted as a long text without any extension. I use mnoGosearch. To Do search within files and documents, All mime types should be specified in indexer.conf. As i have files with encrypted names and no extensions, They are not indexed by mnoGoSearch. How to make mnogosearch to detemine the filetype automatically.? Note: the command "file asajhfjsdiufhjkdfhskjf34287jnjk" gives the proper file type of it. eventhough the file name is encryted.
View Replies !
View Related
Mime Multipart Shows Up As Attachment
I wrote a little function to send emails which works quite well. I already managed to send attachments correctly (also more than 1 per email) but I am not able to send a HTML mail containing a text only block for non-HTML clients. I will not post the PHP code as I think it is irrelevant, the error lies within the mail header and/or body, so here is the mail I do want to send: FROM: me <foo@bar.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MIME_BOUNDARY" --MIME_BOUNDARY Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit This is a multi-part message in MIME format. navision://client/run?etcetc --MIME_BOUNDARY Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 8bit <html><body> <a href="navision://client/run?etcetc">click me</a> </body></html> --MIME_BOUNDARY-- The first 3 lines are passed as the header to PHP's mail() function, whereas the rest is passed as the body (starting with the first --MIME_BOUNDARY line). If I send a mail this way I get the mail with the text/plain part displayed and an ATT<random#>.html attachment containing the text/html part.
View Replies !
View Related
MIME Types That Reffer To TEXT
I am trying to validate that a file submitted through a form is a TEXT file. When I use $_FILES['userfile_PFAM']['type']=='text/plain' it works, but only for files with .txt extension. But the user may also have a file containing text data and may not have given the .txt extension (for example I found that application/octet-stream also reffers to TEXT files). Does anybody know which of the MIME types of PHP must I check for? The MIME types that reffer to TEXT I mean.
View Replies !
View Related
Printing Data Of Two Different MIME Types?
Is there any work around forĀ printing data of two different MIME types in same file? I am fetching images from database and at the same there is some HTML also. Once I set content type to image I cant print HTML. Printing image from database is another function. How can I print or override headers?
View Replies !
View Related
|