没有PHP从html表单发送电子邮件

时间:2022-01-28 18:13:38

Is there a service that allows you to post a form to it from an html page (my php mail isn't working temporarily and I need a quick solution) and it will automatically send an email with specified content to a specified address?

是否有一项服务,允许您从一个HTML页面发布一个表单(我的PHP邮件暂时不工作,我需要一个快速的解决方案),它会自动发送一个指定内容的电子邮件到指定的地址?

The address it comes from is insignificant.

它来自的地址微不足道。

4 个解决方案

#1


7  

There's no perfect solution because they are still encoded as url variables. Setting the enctype to plaintext makes it somewhat more acceptable.

没有完美的解决方案,因为它们仍然被编码为url变量。将enctype设置为明文使其更容易被接受。

<form action="mailto:email@example.com" enctype="text/plain">
<textarea></textarea>
</form>

#2


20  

Check out formspree.

查看formspree。

https://github.com/asm-products/formspree

https://github.com/asm-products/formspree

For action you simply put:

对于行动,你只需:

<form action="http://formspree.io/you@email.com" method="post">
<input type="text" name="name">
<input type="email" name="_replyto">
<input type="submit" value="Send">

After verifying your email after the first send this will email you the contents of the form. One thing to keep in mind is that this will take the input names. If you do not include input names it won't send you that form field.

在第一次发送后验证您的电子邮件后,将通过电子邮件向您发送表单的内容。要记住的一件事是,这将采用输入名称。如果您不包含输入名称,则不会向您发送该表单字段。

#3


3  

in your html form provide a mailto action.

在您的html表单中提供mailto操作。

for example

例如

<form action="mailto:yourdest@email.com">
.....
</form>

#4


3  

I don't believe you can within the website. As the others stated, you can use mailto:someone@blahblah.com, but that is not automatic and it opens the user's default email editor. You could use http://www.emailmeform.com/ though. It lets you make a form and it will send an email to you.

我不相信你可以在网站内。正如其他人所说,您可以使用mailto:someone@blahblah.com,但这不是自动的,它会打开用户的默认电子邮件编辑器。您可以使用http://www.emailmeform.com/。它可以让你制作一个表格,它会发送一封电子邮件给你。

#1


7  

There's no perfect solution because they are still encoded as url variables. Setting the enctype to plaintext makes it somewhat more acceptable.

没有完美的解决方案,因为它们仍然被编码为url变量。将enctype设置为明文使其更容易被接受。

<form action="mailto:email@example.com" enctype="text/plain">
<textarea></textarea>
</form>

#2


20  

Check out formspree.

查看formspree。

https://github.com/asm-products/formspree

https://github.com/asm-products/formspree

For action you simply put:

对于行动,你只需:

<form action="http://formspree.io/you@email.com" method="post">
<input type="text" name="name">
<input type="email" name="_replyto">
<input type="submit" value="Send">

After verifying your email after the first send this will email you the contents of the form. One thing to keep in mind is that this will take the input names. If you do not include input names it won't send you that form field.

在第一次发送后验证您的电子邮件后,将通过电子邮件向您发送表单的内容。要记住的一件事是,这将采用输入名称。如果您不包含输入名称,则不会向您发送该表单字段。

#3


3  

in your html form provide a mailto action.

在您的html表单中提供mailto操作。

for example

例如

<form action="mailto:yourdest@email.com">
.....
</form>

#4


3  

I don't believe you can within the website. As the others stated, you can use mailto:someone@blahblah.com, but that is not automatic and it opens the user's default email editor. You could use http://www.emailmeform.com/ though. It lets you make a form and it will send an email to you.

我不相信你可以在网站内。正如其他人所说,您可以使用mailto:someone@blahblah.com,但这不是自动的,它会打开用户的默认电子邮件编辑器。您可以使用http://www.emailmeform.com/。它可以让你制作一个表格,它会发送一封电子邮件给你。