mime

IIS 7.5 Accept Header MIME type not set correctly for most file types

Currently, all our headers are set to "text/html, application/xhtml+xml, application/sml;q=0.9, /; q=0.8". It would seem from looking at this that our accept headers are not being set correctly in IIS 7. This is the setting for images, .json, everything else. Is this correct, or is this incorrect? In webkit browsers, we are getting an '...

MIME-type conventions, standards or limitations?

Given a new, proprietary file format that cannot currently be handled by any known application, I assume you can just invent a new MIME type value as follows: Content-Type: application/my-arbitrary-format Assuming this is the way to go, are there any limitations (format, syntax, length, reserved words, or otherwise), standards (IETF, ...

Sending in UTF-8 from Mail_Queue PEAR Package

So, I have set up the PEAR Mail_queue package on my server, and I have it running fine, and sending emails out. I have it set to run by a cron-job every 15 minutes. Everything works fine, except the problem is that I need to send emails in Chinese, and when I send them using the Mail_queue package, I only get gibberish. I'm assuming that...

JAX-RS (Jersey) custom exception with XML or JSON

I have a REST service built using Jersey. I want to be able to set the MIME of my custom exception writers depending on the MIME that was sent to the server. application/json is returned when json is received, and application/xml when xml is received. Now I hard code application/json, but that's making the XML clients left in the dark....

Launching an application from a web page without displaying the file open\save prompt in IE.

I have an application that can be passed parameters by supplying a local file containing the parameters on its command line. We also have an ASP.NET web application that can return out applications parameter file. We would like the end user to be able to click on a link to an ASP.NET page that generates the parameter file and have IE dow...

MIME handler for Internet Explorer

I want to have an equivalent of NPAPI plugin for Firefox (or just any other sane browser). Generally I need IE to start my own program in response to object tag and let it draw the content itself. Where do I start? I tried to look it up on MSDN http://msdn.microsoft.com/en-us/library/aa902517.aspx but could not find anything suitable...

MIME type warning in chrome for png images

Just ran my site in chrome and suprisingly it comes up with this warning for each of my .png images: Resource interpreted as image but transferred with MIME type application/octet-stream. Anyone seen this before? Regards ...

Handling File Contents Before Writing to Disc C#

So I have decrypted a file and am left with a byte array containing this (Uni-encoded): Content-Type: text/plain; name="testfile.txt" Content-Transfer-Encoding: binary Content-Disposition: attachment; filename="testfile.txt" My super secret message. Where "My super secret message." is the contents of the file, which could be ...

C# Create MIME Header Information? (Content-Type etc.)

I am reading in a file and want to add MIME header infromation to the top of the file. For example: I have a text file called test.txt. I read the file into a byte array then want to append the following to the beggining: Content-Type: text/plain; name="test.txt" Content-Transfer-Encoding: binary Content-Disposition: attachment; ...

C# Create MIME Message?

Is there any built in functionality to MIME a file in C# .Net? What I am looking to do is: Convert a file into a MIME message Sign the MIME Message to a pcks 7 blob MIME that pkcs 7 blob Finally encrypt the entire thing. Any suggestions on how I would go about this (not the encryption or signing part but the MIMEing)? What exactly is...

convert from byte array and mime type to string / object

Given a MIME string, how can I parse it to extract the charset? And is there a utility to map the different MIME types to object types (e.g., return 'xml' for both text/xml and application/xml) ...

Write MIME file with double-quotes

I am manually creating a multi-part MIME-formatted file and submitting it to an SMTP pickup directory. When the email arrives in my inbox it has lost the opening double-quote of any double-quote terms. e.g. <html lang="eng"> becomes <html lang=ng"> I have checked the file before it is submitted to SMTP (PowerMTA) and it does cont...

Trouble sending email with perl

I have a program that runs every 4 hours and I want it to send an email to me when it does. So I added this: my $host = "smtp.central.cox.net"; my $message = MIME::Lite->new( From => '*********', To => '*********', Subject => 'KMZ Downloader', Data => "Successful on $now_string" ); MIM...

Error using MIME::lite

I dont know if this error is specific to MIME::lite but I am getting it while I am trying to use smtp email with MIME. No SASL mechanism found at C:/Perl/site/lib/Authen/SASL.pm line 77 at C:/Perl/lib/Net/SMTP.pm line 143 What does this error mean? ...

Imap message encodeing problem

Some of the mails contents fetched from imap server looks like =C3=B6=C3=BC=C3=B6=C3=BC=C3=B6=C3=BC= what kind of encoding is this? Mail header encoding is UTF-8 but decoding with UTF-8 i got scrambled msg. Any help is much appreciated. ...

How to get the mime data from the DataHandler

I send a soap message using MTOM by Axis2, and i monitor the soap get the message below: --MIMEBoundaryurn_uuid_5C5747FDE5329B8CEB1280130156514 Content-Type: application/xop+xml; charset=UTF-8; type="text/xml" Content-Transfer-Encoding: binary Content-ID: <0.urn:uuid:[email protected]> <?xml version='1.0' e...

Setting Return-Path with Python sendmail for a MIME message

Hi, Hi would like to set the "Return-Path" header for a MIME message I send with Python. Basically, I tried something like this : message = MIMEMultipart() message.add_header("Return-Path", "[email protected]") #... smtplib.SMTP().sendmail(from, to, message.as_string()) The message I receive have its "Return-Path" header set ...

How to detect whether Outlook digitally signs an email by default?

Background: I'm working on an Outlook addin which adds an attachment to outgoing emails. Support is required for all versions of Outlook. When a MailItem has been signed with a digital signature, adding an attachment to this mailItem generally fails unless you save the mail item. This removes the signature from mailitem. To me, this is ...

Multipart email coming through as mixed rather than alternative

We use a third party system for sending bulk emailings. A strange thing occurred recently. We send multipart emails and they normally show up in our company's inboxes as HTML but within the past month one specific mailing started showing up in our inboxes as text with an HTML attachment. I noticed that the header previously had a cont...

Problem sending HTML Mails using MAPI and Outlook

I am trying sending HTML e-mails using MAPI calls in my Delphi Application. When the client is Thunderbird if works fine. But when the client is Microsoft Outlook or Outlook Express I need to save the HTML code in a file and send it as the first attachment of my message, elsewhere the mail client interpret the HTML as text, showing the t...