E:\web\learnaspcom\htdocs\freebook\learn\ubtoc.xml LearnAsp.com - ASP ASP.net Free Lessons
Search Search

#1 worldwide
FREE Coding Lessons

since 1996
   THE BEST WAY to learn ASP & Asp.net!
Advertise Here!
click for details
Credits Host:
DiscountASP.net
Server Admin:
The "Team"
Contact Info.
Charles M. Carroll
<Asp.net blog>
<personal site>
xxx

Utility Belt: Email Capabilities: Testig If Message Can Be Sent
by Charles Carroll

Some peoples server is not configured to send mail correctly. We also provide an easy way to test that your server is configured correctly and to see if the settings in your utilitybelt.config are working to ensure your configuration.

   filename=/experiments/utilitybelt/vercurrent/ubdemo_mailsendtest.aspx

<Test Script Below>


<%@debug="true" %>
<%@ Assembly src="utilitybelt.vb" %>
<script language="VB" runat="server">
    dim ub1 as new LearnAsp.utilitybelt()
Sub Page_Load(S As Object, E As EventArgs)
    ub1.Options("Debug-on")

    ' UtilityBelt.config defaults to localhost
    ' which works on 90% of the configs
    ' Adjust UtilityBelt.config if localhost is not working

    ' From first, then To
    If ub1.MailMsgTest("tester@learnasp.com","darthcarroll@learnasp.com")
        litmailtest.text="Mail Test Worked. you are configured Fine!"
    ELSE
        litmailtest.text="Mail Test Failed. You need to configure your servers correctly!"
    END IF
End Sub
</script>
<html><head>
<title>Utility Belt Demo</title>
</head>
<body bgcolor="#FFFFFF">
<asp:literal id="litMailtest" runat="server" />
</body></html>
Chaz Wish List
Tall Tip $5
Grande Tip $20
Venti Tip $39
Tip Jar Thanks
2004 Thanks
2005 Thanks
HUGE Tip -love site