Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SmtpMail.Send

Status
Not open for further replies.

lazydays

Technical User
Sep 29, 2003
93
GB
Hi,

I am new to ASP.NET and am trying to set up an email program.
I have the following code, but it returns a '405 error - Resource Not Allowed' and I don't know why.

<%@Page Explicit="True" Language="VB" Debug="True" %>
<%@Import Namespace="System.Web.Mail" %>
<HTML>
<BODY>
<%
Dim EMailTo As String = "lazy.days@btinternet.com"
Dim EMailFrom As String = "sandra@softsource.co.uk"
Dim EMailSubject As String = "Test Message from ASP script"
Dim EMailBody As String

EMailBody = "This is a test to see if ASP mail works"

SmtpMail.SmtpServer = "smtp.hotchilli.net"
SmtpMail.Send(EMailFrom, EMailTo, EMailSubject, EMailBody)
%>
Email has been sent.
</BODY>
</HTML>

Can anyone help me?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top