Skip to content

The Open Source DocuSign Alternative.

layout, remove debug send

Timur Ercanfda4aacf39a2
diff --git a/apps/web/pages/api/documents/[id]/send.ts b/apps/web/pages/api/documents/[id]/send.ts
index 455a8c740..42d22a5df 100644
--- a/apps/web/pages/api/documents/[id]/send.ts
+++ b/apps/web/pages/api/documents/[id]/send.ts
@@ -42,14 +42,13 @@ async function postHandler(req: NextApiRequest, res: NextApiResponse) {
const recipients = prisma.recipient.findMany({
where: {
documentId: +documentId,
- // sendStatus: SendStatus.NOT_SENT, // TODO REDO AFTER DEBUG
+ sendStatus: SendStatus.NOT_SENT, // TODO REDO AFTER DEBUG
},
});
// todo check if recipient has an account and show them in their inbox or something
(await recipients).forEach(async (recipient) => {
await sendSigningRequest(recipient, document);
- await sendSignedMail(recipient, document);
});
// todo way better error handling
diff --git a/packages/lib/mail/sendSignedMail.ts b/packages/lib/mail/sendSignedMail.ts
index 82fdb2aa1..7fca9a38d 100644
--- a/packages/lib/mail/sendSignedMail.ts
+++ b/packages/lib/mail/sendSignedMail.ts
@@ -14,10 +14,10 @@ export const sendSignedMail = async (recipient: any, document: any) => {
${document.User.name || recipient.email} has signed your document ${
document.title
}.
- <p style="margin: 24px;">
+ <p style="margin: 30px;">
<a href="${NEXT_PUBLIC_WEBAPP_URL}/documents/${
document.id
- }" style="background-color: #37f095; color: white; border-color: transparent; border-width: 1px; border-radius: 0.375rem; font-size: 18px; padding-left: 16px; padding-right: 16px; padding-top: 10px; padding-bottom: 10px; text-decoration: none;">
+ }" style="background-color: #37f095; color: white; border-color: transparent; border-width: 1px; border-radius: 0.375rem; font-size: 18px; padding-left: 16px; padding-right: 16px; padding-top: 10px; padding-bottom: 10px; text-decoration: none; margin-top: 4px; margin-bottom: 4px;">
View Document
</a>
</p>
@@ -40,6 +40,10 @@ export const sendSignedMail = async (recipient: any, document: any) => {
<br>
Contact us at <a href="mailto:[email protected]">[email protected]</a>
</div>
+ <hr size="1" style="height: 1px; border: none; color: #D8D8D8; background-color: #D8D8D8">
+ <div style="text-align: center">
+ <small>Easy and beautiful document signing by Documenso.</small>
+ </div>
</div>
`
);
diff --git a/packages/lib/mail/sendSigningRequest.ts b/packages/lib/mail/sendSigningRequest.ts
index 4a9f0b9e6..3a256f382 100644
--- a/packages/lib/mail/sendSigningRequest.ts
+++ b/packages/lib/mail/sendSigningRequest.ts
@@ -13,8 +13,8 @@ export const sendSigningRequest = async (recipient: any, document: any) => {
<div style="text-align:center; margin: auto; font-size: 14px; font-color: #353434; max-width: 500px; border-radius: 0.375rem; background: white; padding: 50px">
<img src="${NEXT_PUBLIC_WEBAPP_URL}/logo_h.png" alt="Documenso Logo" style="width: 180px; display: block; margin: auto; margin-bottom: 14px;">
${document.User.name} (${document.User.email}) has sent you a document to sign.
- <p style="margin: 24px;">
- <a href="${NEXT_PUBLIC_WEBAPP_URL}/documents/${document.id}/sign?token=${recipient.token}" style="background-color: #37f095; color: white; border-color: transparent; border-width: 1px; border-radius: 0.375rem; font-size: 18px; padding-left: 16px; padding-right: 16px; padding-top: 10px; padding-bottom: 10px; text-decoration: none;">
+ <p style="margin: 30px;">
+ <a href="${NEXT_PUBLIC_WEBAPP_URL}/documents/${document.id}/sign?token=${recipient.token}" style="background-color: #37f095; color: white; border-color: transparent; border-width: 1px; border-radius: 0.375rem; font-size: 18px; padding-left: 16px; padding-right: 16px; padding-top: 10px; padding-bottom: 10px; text-decoration: none; margin-top: 4px; margin-bottom: 4px;">
Sign Document
</a>
</p>
@@ -35,6 +35,10 @@ export const sendSigningRequest = async (recipient: any, document: any) => {
<br>
Contact us at <a href="mailto:[email protected]">[email protected]</a>
</div>
+ <hr size="1" style="height: 1px; border: none; color: #D8D8D8; background-color: #D8D8D8">
+ <div style="text-align: center">
+ <small>Easy and beautiful document signing by Documenso.</small>
+ </div>
</div>
`
);