a batch file is an old DOS type of program that hardly anyone uses any more.
what your looking for is an ASP Script.
Questions :
do you have a web service already ? (a hosting account)
does your hosting account have ASP Enabled ? some hosting accounts are only Linux and PHP. assuming that is a YES... then something like this SHOULD send your email out. provided that the hosting account has CDONTS active.
this page is designed to be INCLUDED into another after you have set the required variables and done validation.
Code:
<%
' ==============================================================
' Created By : GetMySiteOnline.Com
' Created On : Sunday, April 24th, 2005
' Routine Name : SendEmail.asp
' Description : Main Page to send Emails
' Used to store info the system sends out or
' Forms the users fills out and submits
'
' Modification History :
' Modified On Reason
'
' ==============================================================
%>
<!--#include file="DatabaseConnectionInfo.asp"-->
<%
' _________________________________________________________________________________________
if intUserRecordID ="" then intUserRecordID ="0"
if strFullName ="" then strFullName ="{No Name Given}"
if strUserName ="" then strUserName ="{No UserName Given}"
strNow =Now()
if strCategory ="" then strCategory ="{no category}"
if strSubject ="" then strSubject ="{no subject}"
' __________________________________________________________________________
' Insert the Email contents into the database.
SQL="INSERT INTO EmailTable (ReadStatus, OutBound, UserRecordID, UserName, Name, EmailAddress, DateTime, Category, Subject, Body) VALUES ('0', '1', '" & intUserRecordID & "', '" & strUserName & "', '" & strFullName & "', '" & strEmailAddress & "', '" & strNow & "', '" & strCategory & "', '" & strSubject & "', '" & strBody & "')"
TheDatabase.Execute(SQL)
' __________________________________________________________________________
' Setup the email Message
strMsgHeader = "Greetings From OurWebSite.com !"
strMsgHeader = strMsgHeader & vbcrlf & vbcrlf
strMsgHeader = strMsgHeader & "THANK YOU for taking the time to write to us !"
strMsgHeader = strMsgHeader & vbcrlf
strMsgHeader = strMsgHeader & "This is an Automated Notification that we have received your Message. There is no need to respond to this email at this time. We will review your message and if warranted, respond appropriately."
strMsgHeader = strMsgHeader & vbcrlf
strMsgHeader = strMsgHeader & "Your Original Message Is Below."
strMsgHeader = strMsgHeader & vbcrlf
strMsgHeader = strMsgHeader & "______________________________________________________________" & vbcrlf
strMsgHeader = strMsgHeader & "FROM : " & strFullName & vbcrlf
strMsgHeader = strMsgHeader & "Email : " & strEmailAddress & vbcrlf
strMsgHeader = strMsgHeader & "To : yourEmail@yourDomain.Com" & vbcrlf
strMsgHeader = strMsgHeader & "Sent : " & strNow & vbcrlf
strMsgHeader = strMsgHeader & "Category : " & strCategory & vbcrlf
strMsgHeader = strMsgHeader & "Subject : " & strSubject & vbcrlf
strMsgHeader = strMsgHeader & vbcrlf & vbcrlf
strMsgFooter = vbcrlf & "______________________________________________________________"
strMessage = strMsgHeader & strBody & strMsgFooter
' __________________________________________________________________________
' Send the Email.
'Create the CDONTS Object
set objMail = Server.CreateObject("CDONTS.NewMail")
'Set up the mail parameters
objMail.To = strEmailAddress
objMail.From = "yourEmail@yourDomain.Com"
objMail.Bcc = "AnotherEmail@yourDomain.Com"
' objMail.Value("Reply-To") = ""
objMail.Subject = strSubject
objMail.Body = strMessage
'Send the message and release the Object
objMail.Send
set objMail = nothing
' __________________________________________________________________________
%>