How to send Fax attaching PDF in RingCentral in Java

153 Views Asked by At

We were exploring RingCentral fax for sending fax. We wanted to attach pdf docs and send it with Java code. But with RingCentral SDK I just wanted to know how do set the MIME type or content type in the code. Any example will be helpful.

I tried:

Attachment attachment = new Attachment(); 
attachment.fileName = "c:\\ testRun.pdf";

Is there any way to set the document MIME type?

1

There are 1 best solutions below

0
Anirban Sen Chowdhary On

If you can check the sample document here, attachment.contentType is for setting the document content type: https://developers.ringcentral.com/guide/messaging/fax/sending-faxes

Attachment attachment = new Attachment();
attachment.fileName = "testRun.pdf";
attachment.contentType = "application/pdf";