Sending email through windows hosting?

andreww22

New member
Dec 9, 2016
1
0
0
Visit site
I've windows hosting, hosted on asphostportal. I want to ask how to create a email sending simple web service in Windows hosting in a file like mailer.asp as following mailer.php does in php environment. Gets 3 variables and sends email:

Code:
<?php
mail($_GET['email'], $_GET['subject'], $_GET['message']);
?>

I came up with following but it is giving 500 internal error:

Code:
<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject=Request.QueryString("subject")
myMail.From="mail@example.com"
myMail.To=Request.QueryString("email")
myMail.TextBody=Request.QueryString("message")
myMail.Send
set myMail=nothing
%>
Requirement is it should work in Windows environment, no matter it is VBscript, C#, ASP, or ASPX etc
 

Members online

Forum statistics

Threads
324,148
Messages
2,245,053
Members
428,172
Latest member
NellietCurry