dongsuo0517 2016-10-25 19:07
浏览 143
已采纳

有没有办法发送一个电子邮件与输入数据没有PHP或JavaScript只是简单的纯HTML?

I have HTML form with a textbox where user enter his email - let say to register for a newsletter and a button to join.

When clicking the button I'd like to send myself an email with a constant subject like: 'a new user joined your newsletter' and in the body of the email have the text entered by the user.

So with PHP and Javascript code its possible - i'm looking for a pure html code that does the same (in my index.html file)

using <a href: mailto...> or <form action=mailto:... method=post> or <button onclick:mailto...> opens my mail application :(

  1. Is there a way to send that email in the background (without opening the mail application) with the data from textbox in the email body?
  2. if Yes to Q.1 then is there a way to add a fixed subject
  • 写回答

2条回答 默认 最新

  • doushan6161 2016-10-25 19:09
    关注

    No, there is no way you can send email using pure html. Email is sent over SMTP protocol. A browser operates in HTTP protocol. So it's not possible to send email even using pure javascript. Only server can send data using SMTP protocol.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法