Hi there,

I have a code to email a pdf attachment.

public void openMailWindows(String to, String subject,String body, List<File> attachments)
{
StringBuilder strBuilder = new StringBuilder();
strBuilder.append("mailto:");
strBuilder.append(enc(to));
strBuilder.append("?subject=");
strBuilder.append( enc(subject));
strBuilder.append("&body=");
strBuilder.append(enc(body));

String mailto = strBuilder.toString();

for (File f : attachments)
{
mailto += "&attach=" + f.getAbsolutePath();
}

Program.launch(mailto);
}

This is working fine. I am just wondering, if there is any SWT approach to check whether a default email client is set ?

I need to send a message to client, if an email client is not set?

In here, Program.launch(mailto) could be unsuccessful because of many reasons, not only because of email client not set.

cheers,