Java 抄送到gmail地址不需要';好像不行

Java 抄送到gmail地址不需要';好像不行,java,sdk,docusignapi,Java,Sdk,Docusignapi,我使用的是DocuSign Java SDK,需要CarbonCopy的功能,因为我需要将每个文档发送给公司内的一个人,而不是签名者 因此,当我使用gmail地址作为签名人时,电子邮件就会被发送。但是当我用gmail地址给复写邮件的收件人时,邮件永远不会被发送,我也不会收到错误。信封id被返回,就好像一切正常一样 有什么我遗漏的吗?有可能做到这一点吗 // login call available off the AuthenticationApi Authenticatio

我使用的是DocuSign Java SDK,需要CarbonCopy的功能,因为我需要将每个文档发送给公司内的一个人,而不是签名者

因此,当我使用gmail地址作为签名人时,电子邮件就会被发送。但是当我用gmail地址给复写邮件的收件人时,邮件永远不会被发送,我也不会收到错误。信封id被返回,就好像一切正常一样

有什么我遗漏的吗?有可能做到这一点吗

     // login call available off the AuthenticationApi
     AuthenticationApi authApi = new AuthenticationApi();

     // login has some optional parameters we can set
     AuthenticationApi.LoginOptions loginOps = authApi.new LoginOptions();
     loginOps.setApiPassword("true");
     loginOps.setIncludeAccountIdGuid("true");
     LoginInformation loginInfo = authApi.login(loginOps);

     // note that a given user may be a member of multiple accounts
     List<LoginAccount> loginAccounts = loginInfo.getLoginAccounts();

     String accountId = loginAccounts.get(0).getAccountId();

     Path path = Paths.get(sFilePath);
     byte[] PDFContents = Files.readAllBytes(path);

     // Create an envelope that will store the document(s), field(s), and recipient(s)
     EnvelopeDefinition envDef = new EnvelopeDefinition();
     envDef.setEmailSubject("Please sign this document sent from Java SDK)");

     // Add a document to the envelope
     Document doc = new Document();  
     String base64Doc = DatatypeConverter.printBase64Binary(PDFContents);
     doc.setDocumentBase64(base64Doc);
     doc.setName("MaterialRequisition.pdf");    // can be different from actual file name
     doc.setDocumentId("1");

     List<Document> docs = new ArrayList<Document>();
     docs.add(doc);
     envDef.setDocuments(docs);

     // add a recipient to sign the document, identified by name and email we used above
     Signer signer = new Signer();
     signer.setEmail(sApproverEmail);
     signer.setName(sApproverName);
     signer.setRecipientId("1");

     CarbonCopy cc = new CarbonCopy();
     cc.setEmail(sCCEmail);
     cc.setName(sCCName);
     cc.setRecipientId("2");

     // create a signHere tab somewhere on the document for the signer to sign
     // default unit of measurement is pixels, can be mms, cms, inches also
     SignHere signHere = new SignHere();
     signHere.setDocumentId("1");
     signHere.setPageNumber("1");
     signHere.setRecipientId("1");
     signHere.setXPosition("100");
     signHere.setYPosition("710");

     // Can have multiple tabs, so need to add to envelope as a single element list
     List<SignHere> signHereTabs = new ArrayList<SignHere>();      
     signHereTabs.add(signHere);
     Tabs tabs = new Tabs();
     tabs.setSignHereTabs(signHereTabs);
     signer.setTabs(tabs);

     // add recipients (in this case a single signer) to the envelope
     envDef.setRecipients(new Recipients());
     envDef.getRecipients().setSigners(new ArrayList<Signer>());
     envDef.getRecipients().getSigners().add(signer);
     envDef.getRecipients().getCarbonCopies().add(cc);

     // send the envelope by setting |status| to "sent". To save as a draft set to "created"
     envDef.setStatus("sent");

     // instantiate a new EnvelopesApi object
     EnvelopesApi envelopesApi = new EnvelopesApi();

     // call the createEnvelope() API to send the signature request!
     EnvelopeSummary envelopeSummary = envelopesApi.createEnvelope(accountId, envDef);
     logger.debug("Envelope Id "+ envelopeSummary.getEnvelopeId());

     // Delete the PDF file that Logi generated
     Files.delete(path);
//登录调用在AuthenticationApi上可用
AuthenticationApi authApi=新的AuthenticationApi();
//登录有一些可选参数,我们可以设置
AuthenticationApi.LoginOptions loginOps=authApi.new LoginOptions();
loginOps.setApiPassword(“真”);
loginOps.setIncludeAccountdGuid(“真”);
LoginInformation loginInfo=authApi.login(loginOps);
//请注意,给定用户可能是多个帐户的成员
List loginAccounts=loginInfo.getLoginAccounts();
字符串accountId=loginAccounts.get(0).getAccountId();
Path Path=Path.get(sFilePath);
byte[]PDFContents=Files.readAllBytes(路径);
//创建一个信封,用于存储文档、字段和收件人
EnvelopedDefinition envDef=新的EnvelopedDefinition();
setEmailSubject(“请签署从JavaSDK发送的此文档”);
//将文档添加到信封中
单据单据=新单据();
字符串base64Doc=DatatypeConverter.printBase64Binary(PDFContents);
文件setDocumentBase64(base64Doc);
doc.setName(“MaterialRequisition.pdf”);//可以与实际文件名不同
文件setDocumentId(“1”);
列表文档=新建ArrayList();
docs.add(doc);
环境定义文件(文件);
//添加一个收件人来签署我们上面使用的名称和电子邮件标识的文档
签名者签名者=新签名者();
signer.setEmail(sApproverEmail);
签名者设置名称(sApproverName);
签名人setRecipientId(“1”);
CarbonCopy cc=新的CarbonCopy();
抄送setEmail(sCCEmail);
cc.setName(sCCName);
抄送setRecipientId(“2”);
//在文档的某个位置创建signHere选项卡,供签名者签名
//默认测量单位为像素,也可以是彩信、cms、英寸
SignHere SignHere=新的SignHere();
signHere.setDocumentId(“1”);
signHere.setPageNumber(“1”);
signHere.setRecipientId(“1”);
signHere.setXPosition(“100”);
在此处签名。设置位置(“710”);
//可以有多个选项卡,因此需要将其作为单个元素列表添加到信封中
List signHereTabs=new ArrayList();
signHereTabs.add(signHere);
制表符=新制表符();
tabs.setSignHereTabs(signHereTabs);
签名者。设置选项卡(选项卡);
//将收件人(在本例中为单个签名者)添加到信封中
setRecipients(新收件人());
envDef.getRecipients().setSigners(新ArrayList());
envDef.getRecipients().getSigners().add(签名者);
envDef.getRecipients().getCarbonCopies().add(cc);
//通过将“状态”设置为“已发送”发送信封。保存为草稿集的步骤设置为“已创建”
环境定义设置状态(“已发送”);
//实例化一个新的EnvelopesApi对象
EnvelopesApi EnvelopesApi=新的EnvelopesApi();
//调用createEnvelope()API发送签名请求!
EnvelopesSummary EnvelopesSummary=envelopesApi.createEnvelope(accountId,envDef);
debug(“信封Id”+EnvelopesSummary.getEnvelopeId());
//删除Logi生成的PDF文件
删除(路径);

只有当各方根据收件人的订单完成信封后,复写收件人才会收到电子邮件。请看本手册中的复写本收件人描述


调试代码并确保CarbonCopy值是否在到达createEnvelope之前添加到envDef.getRecipients().GetCarbonCopy()中,以及签名人完成完整信封过程后,副本将发送到CarbonCopy收件人的邮件地址,为确保登录到复写件收件人电子邮件地址,必须随已完成的文档一起收到一封电子邮件,您只能在其中查看文档。

复写件收件人只有在各方根据收件人的订单完成信封后才会收到电子邮件。请看本手册中的复写本收件人描述


调试代码并确保CarbonCopy值是否在到达createEnvelope之前添加到envDef.getRecipients().GetCarbonCopy()中,以及签名人完成完整信封过程后,副本将发送到CarbonCopy收件人的邮件地址,为了确保登录到复写收件人的电子邮件地址,必须将电子邮件与已完成的文档一起接收,您只能在其中查看文档。

这很奇怪,因为当我翻转电子邮件地址,让gmail成为我的签名人,让我的公司的电子邮件成为我的复写本时,我收到了这两封电子邮件,而不必先在文档上签名。您是否尝试过将签名人的路由顺序设置为1,即signer.RoutingOrder=“1”,将复写为2,即cc.RoutingOrder=“2”…Hi-Ram。最后尝试设置路由顺序。将签名人设置为1,将副本设置为2,并且不发送电子邮件。然而,正如你所说的,一旦文件签署,电子邮件就变成了复写件,所以现在就只能这样了。谢谢。这很奇怪,因为当我翻转电子邮件地址,让gmail成为我的签名者和我的公司的电子邮件成为我的复写本时,我收到了两封电子邮件,而不必先在文档上签名。您是否尝试过将签名者的发送顺序设置为1,即signer.RoutingOrder=“1”,将复写本的发送顺序设置为2,即cc.RoutingOrder=“2”…Hi-Ram。最后尝试设置路由顺序。将签名人设置为1,将副本设置为2,并且不发送电子邮件。然而,正如你所说,一旦文件签署