从评论框发送电子邮件

发布于 2024-09-24 07:28:27 字数 257 浏览 9 评论 0原文

我去年在 Visual Web Developer 中设计了一个小网站。我使用 smtp 类添加了一个小工具,基本上它允许人们在文本框中写评论,一旦单击“发送”,它就会向我发送一封包含他们输入的内容的电子邮件。

我现在使用cPanel,并且从我所看到的来看没有.net支持(我没有使用专用服务器,它是Linux共享主机),我怎样才能用如此不同的技术编写这样的东西?我不想碰我现有的 CMS,因为我已经完全设计了我的网站,它非常简单且功能齐全。

我只需要指出正确的方向。

I designed a small website last year in visual web developer. I added a small facility using smtp class, basically it allows people to write comments in a text box and once clicked "send" it sends me an email of whatever they typed.

I am now using cPanel, and there is no .net support from what I can see (I am not using a dedicated server, it's a linux shared hosting), how can I write something like this in such different technology? I dont want to touch my existing CMS as I already have my site fully designed its very simple and functional.

I just need pointing to the right direction please.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

紫罗兰の梦幻 2024-10-01 07:28:27

您可以使用 PHP:

<?php
$to = "[email protected]";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "[email protected]";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>

您甚至可以找到一个带有 @ w3schools 形式的示例

You can use PHP:

<?php
$to = "[email protected]";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "[email protected]";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>

You can find even an example with a form @ w3schools

冷了相思 2024-10-01 07:28:27

ASP.net 是由 MS 为 Windows 构建的。您的共享主机很可能是 Linux。

您可以尝试找到允许 asp.net 的廉价 Windows 共享主机,或者尝试找到使用您的主机支持的技术的等效脚本(例如,Adnan 发布的 php 脚本)。最好的选择可能是 php 或 perl,尽管您的主机也可能支持 ruby​​ 或 python。无论如何,这些脚本都很容易编写,并且通过快速谷歌很容易找到。

ASP.net is built by MS for windows. Chances are, your shared hosting is linux.

You can either try to find cheap shared hosting for windows which allows asp.net, or try to find an equivilent script that uses technology your host supports (for example, the php script posted by Adnan). The best bet would probably be php or perl, although your host may also support ruby or python. In any event, these scripts are very easy to write, and very easy to find with a quick google.

爱格式化 2024-10-01 07:28:27

您可能正在寻找“Mono”

http://www.mono-project.com/ASP。网络

You are probably looking for "Mono"

http://www.mono-project.com/ASP.NET

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文