CarbonCopy 到 gmail 地址似乎不起作用
CarbonCopy to a gmail address doesn't seem to work
我正在使用 DocuSign Java SDK 并且需要 CarbonCopy 的功能,因为我需要将每个文档发送给我们公司内部的某个人而不是签名者。
所以当我使用签名者的 gmail 地址时,电子邮件被发送了。但是当我使用 CarbonCopy 收件人的 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);
CarbonCopy 收件人只有在所有各方根据收件人的订单完成信封后才会收到电子邮件。查看此 link 中的 Carbon Copies Recipient 描述。
调试代码并确保 CarbonCopy 值是否在到达 createEnvelope 之前添加到 envDef.getRecipients().getCarbonCopies() 中,并且当签名者完成完整的信封过程时,此后将复制一个副本发送到抄送收件人邮件地址,以确保登录 CarbonCopy 收件人电子邮件地址必须收到电子邮件以及完成的文档,您只能在其中查看文档..
我正在使用 DocuSign Java SDK 并且需要 CarbonCopy 的功能,因为我需要将每个文档发送给我们公司内部的某个人而不是签名者。
所以当我使用签名者的 gmail 地址时,电子邮件被发送了。但是当我使用 CarbonCopy 收件人的 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);
CarbonCopy 收件人只有在所有各方根据收件人的订单完成信封后才会收到电子邮件。查看此 link 中的 Carbon Copies Recipient 描述。
调试代码并确保 CarbonCopy 值是否在到达 createEnvelope 之前添加到 envDef.getRecipients().getCarbonCopies() 中,并且当签名者完成完整的信封过程时,此后将复制一个副本发送到抄送收件人邮件地址,以确保登录 CarbonCopy 收件人电子邮件地址必须收到电子邮件以及完成的文档,您只能在其中查看文档..