Independentsoft
- any library, any programming language
Home
Purchase
Support
Company
Contact
JGraph
>
Tutorial
> Create mail folder
Create a new mail folder in the root folder of the user's mailbox.
import com.independentsoft.graph.GraphClient; import com.independentsoft.graph.GraphException; import com.independentsoft.graph.mails.MailFolder; public class Console { public static void main(String[] args) { try { GraphClient client = new GraphClient(); client.setClientId("63333333-209e-454e-b7bd-55a4d201270f"); client.setTenant("independentsoft.onmicrosoft.com"); client.setClientSecret("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); MailFolder mailFolder = new MailFolder(); mailFolder.setDisplayName("MyMails"); MailFolder createdFolder = client.createMailFolder(mailFolder, "info@independentsoft.onmicrosoft.com"); System.out.println("Id: " + createdFolder.getId()); System.out.println("DisplayName: " + createdFolder.getDisplayName()); } catch (GraphException e) { System.out.println(e.getCode()); System.out.println(e.getMessage()); e.printStackTrace(); } } }
Need help? Ask our developers:
Name*
Email*
Message*