views:

57

answers:

3

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.

+3  A: 

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

Adnan
thank you, looks like im gonna be leanring php :D
brux
yep, you'll need to learn PHP. There are other languages you could try, but PHP is the most widely supported, and it works on Windows as well, so if you ever move back to a windows system you won't have to rewrite again.
Spudley
A: 

You are probably looking for "Mono"

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

Jaydee
how is he going to use mono in a shared environment?
Matt Briggs
Doh. That'll teach me to read the full question.
Jaydee
+2  A: 

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.

Matt Briggs