*
The moose likes Other JSE/JEE APIs and the fly likes html email detect if Outlook or PDA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "html email detect if Outlook or PDA" Watch "html email detect if Outlook or PDA" New topic
Author

html email detect if Outlook or PDA

Dave Meyers
Greenhorn

Joined: Mar 28, 2003
Posts: 5
I'd like to detect if a html email that I am sending (via Java) is being viewed in a PDA or in Outlook. My goal is to send one html email. If the email is viewed in Outlook display 10 columns. If the html email is being viewed in a PDA I would suppress 5 of the columns. Is there any way to do this?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Well, it's not you that's going to detect that, right? (You said "I'd like to detect...") So you have to ask yourself what is going to do the detecting. The only possibilities are the e-mail message and the HTML in it.
Dave Meyers
Greenhorn

Joined: Mar 28, 2003
Posts: 5
Do you know of any ways for the email message or html to detect how it is being viewed or other tricks to solve this problem?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

I'm not aware of any HTML elements which work differently based on the container which is displaying them. And I wouldn't expect to find any either, since HTML isn't that kind of language. Normally, as I expect you know, that sort of thing is done with Javascript and CSS, but e-mail clients wouldn't normally execute Javascript and they might not bother with CSS either. Of course you could experiment with those things but I wouldn't expect them to do what you want.

If it were me I would just e-mail a link to an HTML document with suitable Javascript or CSS, and pass the responsibility to the browser.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html email detect if Outlook or PDA
 
Similar Threads
Sending emails with HTML or not?
JavaMail - Multilang Emails
Email tracking possible ?
want to generate html formatted email that supports outlook?
Problem in formatting of what is displayed in Outlook's opened window