Calling the default mail client "mailto:" from webdynpro application - java
I want to call the default mail client from webdynpro java.
I came across "LinktoURL" button which can be used for it.
But i need to call the mail client from a normal Button click, since it has the logic to get me the datas for sending the mail to.
I am using Netweaver 7.0.
Share your ideas.
Try this code in the onAction method of the button,
String toUsers = " to users Email Ids"; String subject = "Subject"; String ccEmailIds = " cc users Email Ids"; String url = "mailto:" + toUsers + "?subject=" + subject + "&cc=" + ccEmailIds; IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(url); window.show(); window.destroyInstance();
This will open the outlook new mail window with given info, if outlook is configured in your system.