cancel
Showing results for 
Search instead for 
Did you mean: 

Calling the default mail client "mailto:" from webdynpro application - java

Former Member
0 Kudos

Hi,

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.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

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.

Regards,

Vishweshwara P.K.M.

Former Member
0 Kudos

Thank you Vishwesh.

It Worked

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Swaminatan,

Use this code:

	  String mailString = "mailto:myMail&subject=EnterTheSubject&body=EnterTheBody";

IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(mailString, "My window title");


window.show();

Best Regards,

Aldo.

Words Build Worlds, Enrique Baliño.