有没有办法在不涉及后端的情况下使用Angular 4发送电子邮件?
我试过formspree,但没有帮助。
<form method="POST"
action="https://formspree.io/[email protected]">
<input type="email" name="email" placeholder="Your email">
<textarea name="message" placeholder="Test Message"></textarea>
<button type="submit">Send Test</button>
</form>
或者我是以错误的方式实施它?
任何帮助都会很棒。谢谢。
Angular使每个form
元素成为一个NgForm
隐含地操纵形式的行为。
您需要将NgNoForm
属性设置为表单。
<form method="POST" ngNoForm
action="https://formspree.io/[email protected]">
<input type="email" name="email" placeholder="Your email">
<textarea name="message" placeholder="Test Message"></textarea>
<button type="submit">Send Test</button>
</form>