|
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
<%@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>
|