Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
chore: logs mock email credentials and adds field placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobsfletch committed Apr 10, 2022
1 parent f5039e8 commit 07bc1b2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion demo/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ app.get('/', (_, res) => {
payload.init({
secret: process.env.PAYLOAD_SECRET,
mongoURL: process.env.MONGODB_URI,
email: {
fromAddress: 'dev@email.com',
fromName: 'First Last',
logMockCredentials: true
},
express: app,
onInit: () => {
payload.logger.info(`Payload Admin URL: ${payload.getAdminURL()}`);
Expand All @@ -21,4 +26,4 @@ payload.init({

// Add your own express routes here

app.listen(3000);
app.listen(3000);
5 changes: 3 additions & 2 deletions src/collections/Forms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export const generateFormCollection = (formConfig: FormConfig): CollectionConfig
required: true,
admin: {
width: '50%',
placeholder: 'Email Sender <sender@email.com>'
},
},
{
Expand All @@ -139,7 +140,7 @@ export const generateFormCollection = (formConfig: FormConfig): CollectionConfig
label: 'Email From',
admin: {
width: '50%',
placeholder: '{{email}}',
placeholder: 'Email Recipient <{{email}}>',
},
},
],
Expand Down Expand Up @@ -177,7 +178,7 @@ export const generateFormCollection = (formConfig: FormConfig): CollectionConfig
name: 'message',
label: 'Message',
admin: {
description: 'Enter the email message that should be sent in this email.',
description: 'Enter the message that should be sent in this email.',
},
},
],
Expand Down

0 comments on commit 07bc1b2

Please sign in to comment.