Hi everybody,
When i try to execute the last example(Sending EMail to Admin)in chapter 17,an error raises and announces:
System.Runtime.InteropServices.COMException: The "SendUsing" configuration value is invalid
Here is the code:
<%@ Import Namespace="System.Web.Mail" %>
<%@ Page Debug="True" %>
<script language="
VB" runat="server" >
Sub SendMailTest()
dim intCounter as integer
intCounter =1
for intCounter=1 to 10
intCounter = intCounter+1
next
response.write ("The value of the counter is:" & intCounter & "<br>")
intCounter = "Storing a string to an integer"
End sub
Sub Page_Error(sender As Object, exc As EventArgs)
dim errorMessage as string
errorMessage = "Error occurred" & Server.GetLastError().ToString()
Server.ClearError()
Dim newMail As New MailMessage
newMail.From = "pearlanaz@yahoo.com"
newMail.To = "nasrinz@hotmail.com"
newMail.Subject = "Error Occurred."
newMail.Body = errorMessage
SmtpMail.Send(newMail)
End Sub
</script>
<%
SendMailTest()
%>
Could anybody help me?
Thanks!!