ideacrew / idc-web

Home of the IdeaCrew Corporate Website
https://ideacrew.com
1 stars 0 forks source link

Fix Contact form #46

Closed bbodine1 closed 1 year ago

bbodine1 commented 1 year ago

Contact form currently does not submit. Moving the website to Netlify halted the function that was deployed to submit the contact form on the old hosting platform.

Make us of netlify forms to submit the contact form and direct emails to the appropriate email address. Gather info from the old function and mimic here.

https://github.com/ideacrew/idc-web/blob/ea90f1b08c9e09ba7466309d125e99dfc9621223/layouts/contact/single.html#L21

bbodine1 commented 1 year ago

Function that was used to send mail in old website.

https://github.com/ideacrew/ic-web/blob/trunk/functions/src/send-email.ts

Old function used sendgrid with the following data:

  const mailData: MailDataRequired = {
    to: 'info@ideacrew.com',
    from: email,
    subject: 'Contact Form Submission',
    html: `<div>Name: ${contactName}</div>
    <div>Company: ${company}</div>
    <div>Email: ${email}</div>
    <p>${message}</p>`,
  };