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条)

报告相同问题?

悬赏问题

  • ¥15 做个有关计算的小程序
  • ¥15 MPI读取tif文件无法正常给各进程分配路径
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
  • ¥15 setInterval 页面闪烁,怎么解决
  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化