|
xxx
Utility Belt:Email Capabilities
by Charles Carroll
The code below shows the email
functionality "Utility Belt" functions. The MailMsg sub is the centerpiece of Utility Belt.
This method is also used internally to email errors that occur at runtime to a
designated email address. See our UtilityBelt.config basics @
utilitybelt_config.aspx
The Email Sample is one demo of The Email "Utility Belt" functionality.
filename=/experiments/utilitybelt/vercurrent/ubdemo_mail.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,xray-to-page-on")
Dim strBodyofMail as string
strBodyOfMail="I am thinking about"
strBodyOfMail &= vbcrlf & "the dark side!!!"
strBodyOfMail &= vbcrlf & "Let me know if you need a hand!"
Dim hashMyMail as new hashtable
with hashMyMail
.Add("to", "Anakin Skywalker <darthcarroll@learnasp.com>")
.Add("from", "Sith Lord <jedi@senate.com>")
.Add("subject","need help?")
.Add("body",strBodyOfMail)
end with
' ub1.Xray(hashMymail,"hashMymail")
ub1.MailMsg(hashMymail)
End Sub
</script>
<html><head>
<title>Utility Belt Demo</title>
</head>
<body bgcolor="#FFFFFF">
<asp:placeholder id="plcErr" runat="server"/>
<form runat="server">
Sent A Mail!
</form>
</body></html>
|