Send Email to link
<a href = "mailto: [email protected]">Send Email</a>
Send Email to link
<a href = "mailto: [email protected]">Send Email</a>
how to send email
import React, { useRef } from "react";
import emailjs from "@emailjs/browser";
const ContactUs = () => {
const form = useRef();
const num =(Math.floor(Math.random() * 1000));
const sendEmail = (e) => {
e.preventDefault();
emailjs
.sendForm("gmail", "test-temp", e.target, "v8vKjhc4544PvRhT-")
.then(
(result) => {
console.log(result);
},
(error) => {
console.log(error.text);
}
);
e.target.reset();
};
return (
<form ref={form} onSubmit={sendEmail}>
<label>Subject</label>
<input type="text" name="subject" />
<label>Name</label>
<input type="text" name="name" />
<label>Email</label>
<input type="email" name="email" />
<label>Send to</label>
<input type="email" name="to_email" />
<label>Message</label>
<textarea name="message" />
<input name="randomNum" defaultValue={num}/>
<input type="submit" value="Send" />
</form>
);
};
export default ContactUs;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us