sendEmail = () => {
window.open("mailto:[email protected]?subject=SendMail&body=Description");
};
return (
<div className="App">
<button
type="button"
className="btn btn-danger"
onClick={this.sendEmail}
>
Send email
</button>
</div>
);
I wrote my code in ReactJs but I am getting the blank screen. Please help.
I don't know why this doesn't work for you, I tested it and it works fine for me, but try using an anchor link instead, like this: