aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Mail API content type 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 "Mail API content type" Watch "Mail API content type" New topic
Author

Mail API content type

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 751
Hello



in the code above i'm passing array list as an arg to my function below



but i'm not able to send arrat list as a message body.the actual thing i want to pass is hash map it self...HOW DO I PASS HASH MAP OR ARRAY LIST AS AN ARGUEMENT ???

ANY IDEA ???


Jigar Naik


Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

Moved to Other Java APIs where JavaMail is discussed.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8708
    
    6

Please KeepItDown.
There's no mime type for representing array lists or hash maps. You need to render the data you are sending as some sort of document so the mail reader on the receiving end can make sense of it.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 751
sorry for caps letter... i did not mean it what you thought...

there is no mime type for passing hash map or array list to messagebodypart...

atlast i had to pass string as an arguement...

what i did is picked every key value pair of hash map and concat it to a String message;

but i feel it's not a good solution.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18127
    
    8

Another solution would be to serialize your data to a byte array, then attach that as if it were a file.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mail API content type
 
Similar Threads
sysntex error in 2 dim array value assignment...
comparing two comma delimited files
sorting
Sort a HashMap based on a Value object's attribute
Mail API content type