@magic-modules/contact

this is the @magic-modules Contact component. It sends email using any smtp server that allows username/password authentication.

installation

npm install magic-modules/contact

config

configuration includes multiple files.
refer to the now.sh docs for more information
// /now.json{  'env': [    'SMTP_USER',    'SMTP_PASS'  ]}// /now-required.json{  'SMTP_USER': '@smtp-user',  'SMTP_PASS': '@smtp-pass',  'SMTP_HOST': 'smtp.mailserver.com'}// /now-secrets.json// !add file to .gitignore{  '@smtp-user': 'your@mailserver.com',  '@smtp-pass': 'password'}

usage

first register this component
// process.cwd()/assets/index.jsconst Contact = require('@magic-modules/contact')module.exports = {  Contact,  //... other exports}
then, in a page:
Contact(),

example

this is how it looks (this form has no server attached):