{"id":25781798,"url":"https://github.com/tobisamcode/mail-me-nodemailer","last_synced_at":"2025-02-27T07:32:11.780Z","repository":{"id":56787124,"uuid":"523919487","full_name":"tobisamcode/mail-me-nodemailer","owner":"tobisamcode","description":"💌 A simple contact form that helps people send you a message. 📩 to your email. - built with JavaScript/Nodemailer 📃","archived":false,"fork":false,"pushed_at":"2022-08-17T09:48:53.000Z","size":26,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-03-10T00:56:12.244Z","etag":null,"topics":["expressjs","javascript","node-js"],"latest_commit_sha":null,"homepage":"https://tobi-mailer.herokuapp.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tobisamcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-12T01:31:52.000Z","updated_at":"2023-01-03T21:05:06.000Z","dependencies_parsed_at":"2022-08-16T06:50:11.216Z","dependency_job_id":null,"html_url":"https://github.com/tobisamcode/mail-me-nodemailer","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobisamcode%2Fmail-me-nodemailer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobisamcode%2Fmail-me-nodemailer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobisamcode%2Fmail-me-nodemailer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobisamcode%2Fmail-me-nodemailer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tobisamcode","download_url":"https://codeload.github.com/tobisamcode/mail-me-nodemailer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240993718,"owners_count":19890418,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["expressjs","javascript","node-js"],"created_at":"2025-02-27T07:30:45.415Z","updated_at":"2025-02-27T07:32:11.775Z","avatar_url":"https://github.com/tobisamcode.png","language":"JavaScript","readme":"## Implementation using async/await:\n\n`app.js`\n\n```javascript\nconst contactForm = document.querySelector(\".contact-form\");\nlet name = document.getElementById(\"name\");\nlet email = document.getElementById(\"email\");\nlet subject = document.getElementById(\"subject\");\nlet message = document.getElementById(\"message\");\n\ncontactForm.addEventListener(\"submit\", (e) =\u003e {\n  e.preventDefault();\n\n  async function postData() {\n    let formData = {\n      name: name.value,\n      email: email.value,\n      subject: subject.value,\n      message: message.value\n    };\n\n    const response = await fetch(\"/\", {\n      method: \"POST\",\n      body: JSON.stringify(formData),\n      headers: {\n        \"Content-Type\": \"application/json\"\n      }\n    });\n\n    if (!response.ok) {\n      throw new Error(`Request failed with status ${reponse.status}`);\n    }\n    console.log(\"Email sent successfully\");\n    name.value = \"\";\n    email.value = \"\";\n    subject.value = \"\";\n    message.value = \"\";\n\n    console.log(formData);\n  }\n  postData();\n});\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobisamcode%2Fmail-me-nodemailer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobisamcode%2Fmail-me-nodemailer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobisamcode%2Fmail-me-nodemailer/lists"}