I am setting up a web app that uses DocuSign to send an eSignature request to various different clients. Each request to a different client needs to have a different displayed sender name and email address, and not just the main name on the DocuSign account. The completed e-signed form also needs to be emailed to these client-specific email addresses as well.
I have created a new second login within my DocuSign account as a test, and am able to get it to display this login's name/email, but only when I generate an entirely new temporary demo API key from that account and use that in the application.
I am able to change the reply email by altering the EnvelopeDefinition.EmailSettings.ReplyEmailAddressOverride field, but the envelope email sent to signers still displays the main account name/email, and signed docs are emailed to the main email.
How can I change the name and email address sent to the signer and the email address signed docs are received by?
string signerName = "John Doe";
string signerEmail = "[email protected]";
string accessToken = "{The DocuSign API KEY}";
string accountId = "{The DocuSign Account Number}";
Document document = new Document
{
DocumentBase64 = Convert.ToBase64String(ReadContent(docName)),
Name = "Please Sign This Form",
FileExtension = "docx",
DocumentId = "1"
};
Document[] documents = new Document[] { document };
Signer signer = new Signer
{
Email = signerEmail,
Name = signerName,
RecipientId = "1",
RoutingOrder = "1"
};
Tabs tabs = new Tabs();
SignHere signHereTab = new SignHere
{
DocumentId = "1",
PageNumber = "1",
AnchorString = "Patient Signature or Mark",
AnchorUnits = "pixels",
AnchorXOffset = "10",
AnchorYOffset = "-18",
Width = "160"
};
List<SignHere> signatureTabs = new List<SignHere>();
signatureTabs.Add(signHereTab);
tabs.SignHereTabs = signatureTabs;
FullName nameTab = new FullName
{
DocumentId = "1",
PageNumber = "1",
TabLabel = "Full Name",
Value = signerName,
AnchorUnits = "pixels",
AnchorString = "Name:",
AnchorXOffset = "133",
AnchorYOffset = "5"
};
List<FullName> nameTabs = new List<FullName>();
nameTabs.Add(nameTab);
tabs.FullNameTabs = nameTabs;
signer.Tabs = tabs;
Recipients recipients = new Recipients
{
Signers = new List<Signer> { signer }
};
EnvelopeDefinition envelopeDefinition = new EnvelopeDefinition
{
EmailSubject = "Please Sign Form",
Documents = new List<Document>(documents),
Recipients = recipients,
Status = "sent"
};
//Override the reply email address
envelopeDefinition.EmailSettings = new EmailSettings();
envelopeDefinition.EmailSettings.ReplyEmailAddressOverride = "[email protected]";
envelopeDefinition.EmailSettings.ReplyEmailNameOverride = "Test Account";
ApiClient apiClient = new ApiClient(basePath);
apiClient.Configuration.AddDefaultHeader("Authorization", "Bearer " + accessToken);
EnvelopesApi envelopesApi = new EnvelopesApi(apiClient.Configuration);
EnvelopeSummary results = envelopesApi.CreateEnvelope(accountId, envelopeDefinition);