Netscape 4.78 seems to be very picky about mime multipart/alternative?

(This may be sort of OT for this forum, but I figured I'd give it a shot.)
I'm experimenting with the javamail API and am having undesired results with mime multipart/alternative.
The message I'm constructing looks like it's correct on inspection (see [1] below), but Netscape Messenger 4.78 insists on displaying the text/plain part, not the text/html part. When I create a similar message from within Messenger (see [2] below), it looks to me to be virtually the same, but Messenger properly displays the text/html part.
Also, when I send my sample message [1] to Outlook Express, OE correctly displays the text/html part. (Haven't tried Eudora yet.)
Is it possibly ordering of the parts? The charset? I guess I can test some more...
My sample code is listed at [3].
Anyone have any ideas?
Thanks,
dwh
[1] Source of the message as constructed by my sample program (some information redacted for privacy):
Return-Path: <[email protected]>
Delivered-To: dhaskin-mydomainname:[email protected]
X-Envelope-To: [email protected]
Received: (qmail 98334 invoked from network); 1 Aug 2002 14:08:55 -0000
Received: from relay1.myhostingprovider.com (HELO relay.myhostingprovider.com) (some.i.p.address)
by yowza.myhostingprovider.com with SMTP; 1 Aug 2002 14:08:55 -0000
Received: (qmail 72904 invoked from network); 1 Aug 2002 14:08:54 -0000
Received: from anotheraddress.anotherprovider.com (HELO dhaskin) (another.i.p.address)
by relay1.myhostingprovider.com with SMTP; 1 Aug 2002 14:08:54 -0000
X-pair-Authenticated: yet.another.ip.address
Message-ID: <4469286.1028211013779.JavaMail.dhaskin@dhaskin>
From: [email protected]
To: [email protected]
Subject: Test
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_Part_0_10910135.1028211013519"
X-Mozilla-Status: 8001
X-Mozilla-Status2: 00000000
X-UIDL: 8a3987a249ce2fba
------=_Part_0_10910135.1028211013519
Content-Type: text/html; charset=Cp1252
Content-Transfer-Encoding: 7bit
<html><b>This</b> is a <i>test</i></html>
------=_Part_0_10910135.1028211013519
Content-Type: text/plain; charset=Cp1252
Content-Transfer-Encoding: 7bit
This is plain text
------=_Part_0_10910135.1028211013519--
[2] Source of a similar message as constructed by Netscape Messenger:
Return-Path: <[email protected]>
Received: from 127.0.0.1 ([127.0.0.1])
by dhaskin (JAMES SMTP Server 2.0a3-cvs) with SMTP ID 181
for <dhaskin@localhost>;
Wed, 31 Jul 2002 14:09:45 -0400
Message-ID: <[email protected]>
Date: Wed, 31 Jul 2002 14:09:45 -0400
From: Denis Haskin <[email protected]>
X-Mailer: Mozilla 4.78 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: dhaskin@localhost
Subject: test from Netscape mail
Content-Type: multipart/alternative;
boundary="------------6AA9B235754EC404EA78FD46"
X-Mozilla-Status: 8001
X-Mozilla-Status2: 00000000
X-UIDL: Mail1028138986024-82
--------------6AA9B235754EC404EA78FD46
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
In both plain and html
--------------6AA9B235754EC404EA78FD46
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
In both plain and <b>html</b></html>
--------------6AA9B235754EC404EA78FD46--
[3]My sample code for sending the message: (yes, stolen straight from the javamail tutorial.)package net.stuff.mail;
import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;
public class Notifier {
   public void notify(final String s) throws Exception {
      Properties props = System.getProperties();
      props.put("mail.smtp.host", m_host);
      javax.mail.Session session = javax.mail.Session.getDefaultInstance(props);
      MimeMessage message = new MimeMessage(session);
      message.setFrom(new InternetAddress(m_from));
      message.addRecipient(Message.RecipientType.TO, new InternetAddress(m_to));
      message.setSubject("Test");
      MimeMultipart multipart = new MimeMultipart("alternative");
      MimeBodyPart part = new MimeBodyPart();
      part.setContent(s, "text/html; charset=" + System.getProperty("file.encoding"));
      multipart.addBodyPart(part);
      MimeBodyPart part2 = new MimeBodyPart();
      part2.setContent("This is plain text", "text/plain; charset=" + System.getProperty("file.encoding"));
      multipart.addBodyPart(part2);
      message.setContent(multipart);
      Transport.send(message);
   public static void main(String[] args) throws Exception {
      Notifier n = new Notifier();
      n.notify("<html><b>This</b> is a <i>test</i></html>");
   final private String m_host = "localhost";
   final private String m_from = "dhaskin@localhost";
   final private String m_to   = "dhaskin@localhost";
}

Thanks for the pointer.
It turns out it's the order of the parts that seems to matter to Netscape. It seems to use the last bodypart by default. So all I did was move the text/html part last, and now Netscape does what I expect.
I tried taking out the charset and encoding, and it still works... it's definitely the order.
Aha. This is actually indicated by the MIME RFC. From http://www.isi.edu/in-notes/rfc2046.txt, section 5.1.4:
In this case, the alternatives appear in an order of increasing faithfulness to the original content. In general, the best choice is the LAST part of a type supported by the recipient system's local environment.

Similar Messages

  • IPod Touch very picky about WiFi networks

    It appears that some of you have already noticed that the iPod touch does not play well on some WiFi networks that otherwise should not be a problem.
    My own personal experience is this. My iPod touch works great on my home network as long as I don't have my repeater plugged in. It's all Linksys gear, probably what 80% or more of you have.
    I have tried it on two networks outside my home so far, and neither one has worked, while my laptop has no problem at all with the same networks. I'm at a Best Western right now. My Ipod is behaving the same way it does when I'm home and my repeater is turned on. It sees the network, gets an ip address and appears to connect properly, but doesn't go anywhere when I try to use any of the apps, Safari, YouTube, or the iTunes store.
    The other network I tried is at work. This requires WPA security. In this case, I can't get an IP address or connect at all. This after verifying the SSID and password many times. Once again, I have no problems with my laptop on this network either.
    It appears that the iPod touch is in desperate need of a few bug fixes and compatibility improvements in this area. I hope Apple is working hard to deliver a firmware update that will correct these issues soon.

    My home connection works great with just WEP encryption with a hidden SSID (yes I know it is weak but it is just a deterrent so the war driver will pass me up and go to the 10 other unsecured networks in my neighborhood haha).
    That being said I have had issues with my companies wireless on campus. I found a trick around it though which might help.
    If it has connected once before to the network in question and will not the 2nd or 3rd time:
    1.go to the settings
    2.then wireless
    3.tell it to forget the network in question
    4.wait in the wireless settings screen for it to see the network in question again and tell it to rejoin.
    I guess this sort of flushes out any corrupted/ weird settings.
    It has worked well for me.

  • I am trying to do a full Time Machine Backup to a new external disk. The backup starts, and it says "Time remaining about 4 days." That seems like a very long time, but the real problem is that the computer "logs off" after a few hours, and the b.u. stops

    I am trying to do a full Time Machine Backup to a new external disk. The backup starts, and it says "Time remaining about 4 days." That seems like a very long time, but the real problem is that the computer "logs off" after a few hours, and the backup stops. The system preferences are set to "Never" for Computer sleep and Display sleep. The computer does not ordinarily log off automatically, but it has done this twice since I started the Time Machine backup.

    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Enter the word "Starting" (without the quotes) in the String Matching text field. You should now see log messages with the words "Starting * backup," where * represents any of the words "automatic," "manual," or "standard." Note the timestamp of the last such message. Clear the text field and scroll back in the log to that time. Select the messages timestamped from then until the end of the backup, or the end of the log if that's not clear. Copy them (command-C) to the Clipboard. Paste (command-V) into a reply to this message.
    If all you see are messages that contain the word "Starting," you didn't clear the search box.
    If there are runs of repeated messages, post only one example of each. Don't post many repetitions of the same message.
    When posting a log extract, be selective. Don't post more than is requested.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Some personal information, such as the names of your files, may be included — anonymize before posting.

  • Where can I find, unplugged / acoustic music in it tunes? There doesn't seem to be very much available.

    Where can I find, unplugged / acoustic music in it tunes? There doesn't seem to be very much available.

    What's available is what the record companies and artists have licensed Apple to sell in your country. There is no genre for "acoustic" or "unplugged", though, so what is there may be a bit tricky to find. You can try doing a Power Search with "unplugged" or "acoustic" in the album title field, but that will of course only find those albums which have those words actually in the title. Otherwise, you may have to look for album titles for acoustic music on some other site and then look for the specific album in the iTunes Store.
    Regards.

  • What happened to the T4i? Seems like it was here then gone...didn't seem to last very long.

    What happened to the T4i? Seems like it was here then gone...didn't seem to last very long. Did it have major problems?

    "How do you like your 7D?"
    Westy,
    In my opinion the 7D is the 'best buy' in a professional level DSLR out there. The pro level featuers are many and the downsides are few.
    If you couple the Canon 7D with the Sigma APO 50-150mm f/2.8 II EX DC HSM, you truly do have a fantastic set-up at the most value considered, reasonable, price.
    EOS 1Ds Mk III, EOS 1D Mk IV EF 50mm f1.2 L, EF 24-70mm f2.8 L,
    EF 70-200mm f2.8 L IS II, Sigma 120-300mm f2.8 EX APO
    Photoshop CS6, ACR 8.7, Lightroom 5.7

  • Having just bought an iMac and set every thing up I have found that my IPad seems to run very slow. I have also just updated the IPad to OS 5.1 .Are these two things connected or is there a problem with the IPad

    Having just bought an iMac and set every thing up I have found that my IPad seems to run very slow. I have also just updated the IPad to OS 5.1 .Are these two things connected or is there a problem with the IPad

    Using the Mac with your iPad has nothing to do with the fact that the iPad is running slow. There could be any number of reasons why the iPad is now running slow.
    Have you tried a reset on the iPad?
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

  • Iphone5 - Downloading application from app store takes more than 24 hours to download and install, even if the memory size of app is very small about 2 MB. WIFI connection seems to works well - because the webpages browsing using safari is very fast.

    I face problem with downloading application from apple store.
    It took more than 5 hours to install google maps application and many other application took more than 24 hours.
    It is very worst to see such downloading performace with my new bought iphone5.
    My WIFI connections seems to be very good. As I can able to open many webpages at very high speed.
    I can able to see my many HD videos open and play immediately once I touch.
    Though i cannot able to test the speed, as the www.speedtest.net also not working in my iphone5.
    When i launch speedtest.net app i get the message "Finding closest server" forever and it is never showing the speed details.
    My laptop shows the 10Mbps speed with speedtest.net on the same WIFI network
    I got much frustrated with iphone5. Can someone help me to fix this issue ?

    Hi Thaimic,
    Thanks for your reply.
    IP Adddress: 192.168.0.101
    Subnetmask: 255.255.255.0
    Router: 192.168.0.7
    DNS: 180.168.255.118, 192.168.1.1
    These are my WLAN details.under DHCP and BootP. Could you please tell me what to do with the DNS ? I do not have idea about the DNS.

  • USB 3.0 port seems to be VERY loose / flimsy (everything keeps disconnecting / reconnecting)

    Just like the title says: my USB 3.0 port seems to be very touchy...even the slightest nudge of whatever's plugged in will cause it to play the device-disconnected chime (but then nearly immediately play the device-reconnected chime).
    Is this a known issue?
    And what do I do to fix?  I assume it's a HARDWARE rather than a software problem, because it's a physical nudge that seems to prompt the disconnect/reconnect...so is this something that i'll need to open my computer to fix? It's not under warranty anymore...

    Hi there @BarryKatz1 
    Welcome to the HP Support Forums! It is a great place to find the help you need, both from other users, HP experts and other support personnel.
    I understand that you have an intermittent USB connection and that the connector seems loose. I am happy to help, and as you surmise, this is more of a hardware issue.
    I certainly feel your pain, I have a notebook that my young son pulled down (more than once) and each time I lost a USB port due to damage, and of the three I had on that notebook, only one still functions.
    The port is a part of the notebook's mainboard, so the main remedy is a board replacement.  You will find the part and part numbers in the service guide, on page 25 of 81.
    HP Spectre 13 Pro Ultrabook and HP Spectre 13 Ultrabook Maintenance and Service Guide
    About the only other thing you can try is a new USB cable for the device, just in case the problem is more cable related.
    I hope this helps.
    Malygris1
    I work on behalf of HP
    Please click Accept as Solution if you feel my post solved your issue, it will help others find the solution.
    Click Kudos Thumbs Up on the right to say “Thanks” for helping!

  • I seem to have very poor wifi signal strength,is there any way to boost my signal

    I seem to have very poor wifi signal strength,is there any way to boost my signal

    If you gave some information on what network equipment you are using (make, model, version) and where you are experiencing signal problems it would help in giving advice.

  • It seems like a very big 1% with no mail?

    it seems like a very big 1% with no mail?
    I've had nothing for nearly 3 days - is it just users with @me accounts?

    I have had an Apple since 1979 and even owned a computer school using all Apples for 20 years. Apple was always there for us. Never had a problem with Apple products. I'd blame the hackers and competetion and the sick people who are out to destroy  instead of building things.
    Go here for info:
    http://www.apple.com/support/icloud/systemstatus/

  • Problem with keyboard shortcut for font size in CC photoshop. The incriments sometimes work, i.e it goes 1 points at the time, but sometimes it goes 10 or even 20 points at the time. It seems to be very random. Any thoughts?

    Problem with keyboard shortcut for font size in CC photoshop. The incriments sometimes work, i.e it goes 1 points at the time, but sometimes it goes 10 or even 20 points at the time. It seems to be very random. Any thought

    You should ask in Photoshop General Discussion
    The Cloud forum is not about using individual programs
    The Cloud forum is about the Cloud as a delivery & install process
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

  • DNS-Resolve seems to be very slow.

    Hello together,
    I recently wrote a program that does some p2p functionality.
    Each instance of the program is a server and a client.
    The clients/servers hostnames are contained in a configuration file.
    Now, if a clients starts the programm it starts a server-thread and trys to connect
    to the other clients. This works well if all clients are running the program.
    If a clients computer is offline, logically the address can not be resolved.
    Under these circumstances, the resolve (or better: not resolve) takes more than
    2 seconds.
    Is there any possibility to shorten this delay?
    Thank you for any advice.
    Mark

    Yes, I actually using windows.
    If the computer is offline why are you try to connect
    to another server anyway?Hm, this is a partial solution, cause if I first start the program, I simply don't know
    wether the other clients are online.
    But generally you are right, I don't have to connect to clients that are offline.
    Right now, I am wondering very much about threads in connection with sockets.
    For the process of synchronization I am using threads. For each client connection one.
    The parent thread waits until each thread has finished, funny isn't it?
    Thank you.
    Kind regards Mark.

  • I keep getting emails for another user; can't seem to contact Apple support about this

    Hi there,
    I keep receiving emails for someone called Amanda to my email address.  These are not spam emails; it seems like someone called Amanda is signing up to reputable websites using my email address.  So far, Pinterest, Educreations and a women's magazine have sent me emails to confirm my membership.  There doesn't seem to be anything suspect going on: they're all respectable websites, and they're always addressed to Amanda.  I was also receiving confidential emails from a legitimate business with invoices etc. a while back.
    I'm confused as to what would be the cause and/or point of this.  It seems like a very benign way to spam/scam somebody.  Is it possible (I feel ridiculous even asking this) that emails can become crossed like telephones?  I know, I know, it's a stupid question.
    I'd like to contact Apple Support about this, but I seem to be going round in circles on the website.  Unless I have AppleCare (mine is expired) I can't seem to get in contact with anyone.  Can anyone help me or point me in the right direction?
    Thanks!

    You can contact iTunes support here : http://www.apple.com/support/itunes/contact/ - click on Express Lane, then iTunes > iTunes Store

  • TS1372 I-Pod classic 120GB just will not sync with tmy i-tunes.....I-tunes reports error 1415, 1417, 1418, 1428, 1429, 1430, 1436 or 1439......No idea what that all means. Ipod is very tempermental about saving my tunes, anyone no what to do?

    I-pod classic 120GB will not sync with my i tunes errors reported 1415, 1517, 1418, 1428, 1429, 1430, 1436 or 1439, completely unsure what any this means? Is my I-pod for the bin seems strange as its only about 2 years old? It finds it very difficult to sync with any of my tunes at all, can anyone help with what to do please. Thanks

    Read this thread. Post back your hard drive stats...
    tt2

  • My ipod classic got wet back in August.. it seemed to work fine for about a month, but recently is not working at all..screen appeared to get cloudy and then it just stopped working. thanks.

    my ipod classic got wet back in August.. it seemed to work fine for about a month, but recently is not working at all..screen appeared to get cloudy and then it just stopped working. thanks.

    Most likely, water damage.
    You can try putting your iPod in a tupperware, half filled (maybe half inch) with rice grains, close the cover for about a week.
    If you have done this, as soon as it got wet, higher chances of success, now looks like the water moisture is getting to the LCD screen.
    Then you can always bring it to Apple Genius bar, for a an overhaul. (may cost you half the price of a new iPod classic.)

Maybe you are looking for