File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes how to call outlook express mail message window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "how to call outlook express mail message window" Watch "how to call outlook express mail message window" New topic
Author

how to call outlook express mail message window

srinivasa varadhan
Greenhorn

Joined: Oct 03, 2003
Posts: 23
hi,
i dont know if this question is for this section. but here goes the question.i want to call the email client outlook express mail message windows through java.what way can i call the message window . i have another query . i need to insert some email address stored in my database table in the mail message's "to" and "from" box.
Any help is appreciated
Srinivas


Srini...
Torch your Thoughts....
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
Hi Srinivasa
I guess we need to use Runtime.exec() here. We can invoke "Outlook Express" via Start->Run option as,
msimn.exe and if we follow directions provided at,
http://www.okinfoweb.com/moe/mail/mail_029.htm
then it should work if we write,
Runtime.exec(new String[]{"msimn.exe","/mailurl:mailto:abc1@isp.com?subject=Stuff&CC=abc2@isp.com;abc3@isp.com&BCC=abc4@isp.com;abc5@isp.com&body=Text"});
See if this works for you.
Regards
Maulin
kiran manohar
Ranch Hand

Joined: Sep 28, 2003
Posts: 49
Maulin,
thanks for the code. its working fine. but i have another problem. i want to monitor the outlook express through java. for example if any email has come to my inbox in outlook express then a notification must be sent to my java client(mostly a java frame) and displayed as a message box.is this possible or am i asking too much. also are there any email api's in java to send and recieve emails.
Thanks for the help maulin.
Regards
Kiranmanohar
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

You can't do that without using native code. There is, however, the JavaMail API, which lets you fetch email directly from Java.


[Jess in Action][AskingGoodQuestions]
kiran manohar
Ranch Hand

Joined: Sep 28, 2003
Posts: 49
Ernest,
thanks for the suggestion.but i need to do it with outlook express. outlook express and my java client should be integrated. if for that i need to know native code, then i will follow that example. but i am new to native code. is there any code in nativejava to integrate outlook express with my java client program. as i told u before my java client has a button which on clicking pops the outlook express with all the addresses in the to,cc,bcc,subject and body sections.
on clicking the send button it goes to the email server which should be integrated with my java server program which has 2 parts a reciever program and a sender program. the reciever program should receive the email address found in the to section and check its validity. if the email address is valid then i have to store it to the database else i should not.
then if the email address is valid i have to send it to the sender java program which will in turn send it to the internet. "in short i need to send an outlook message through my java program to the internet". Any help is appreciated. also can u send me some examples for jni and javamail.
Regards
Kiranmanohar
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
Hi Kiran
From the description you give here, it seems you are just popping Outlook express message window for composing a message. Rest everything you want to work via Java program. Am I right?
If I am correct in this assumption then I wonder "why" would one need to do that? Why not just popup a Java frame having those fields and let the user compose a message and then send it..??
Thanks!
Maulin
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
also, I wonder how come the questioner changed from "Srinivasa" to Kiran ?
OR I missed something here...
Regards
Maulin
kiran manohar
Ranch Hand

Joined: Sep 28, 2003
Posts: 49
maulin
for the question why not popup a java frame, the requirement is basically from a outlook express.i have to stick with this. then the name change is bcoz srinivas and me are co-workers
ok can i use native api to solve the problem. if so any ideas of how to go about it as i am new both javamail and jni technology. any examples would be heartly welcomed.
Thanks
Kiranmanohar
kiran manohar
Ranch Hand

Joined: Sep 28, 2003
Posts: 49
another thing how to know the smtp address, username, password in my machine as of the smtp server running in my machine
Cheers
Kiranmanohar
kiran manohar
Ranch Hand

Joined: Sep 28, 2003
Posts: 49
hi maulin,
the code which u had given me to invoke the outlook express window is working fine except that when i give a whitespace between two words in the subject or message text then it fails to invoke the outlook express mail message window. instead it invokes the msimn.exe . In the link which u had given for invoking the outlook mail message window it was given that in case of a space in the subject text we have to give double quotes for the text to work. but i want it without double quotes . is there any solution for this. thanks once again .
[CODE}
Runtime.exec(new String[]{"msimn.exe","/mailurl:mailto:abc1@isp.com?subject=Stuff&CC=abc2@isp.com;abc3@isp.com&BCC=abc4@isp.com;abc5@isp.com&body=Text"});
[/CODE]
Regards
Kiranmanohar
kiran manohar
Ranch Hand

Joined: Sep 28, 2003
Posts: 49
maulin,
i have solved the problem for the whitespaces between the subject and body by using the %20 and replacing all whitespaces with %20.
thanks for the interest u have shown
regards
Kiranmanohar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to call outlook express mail message window
 
Similar Threads
java mail smtp
POP3 mail
to call outlook express mail message window
JavaMail API
to call outlook express in java/ native api