Programmatically Sending Email

The following programming examples will not work within Web Press.

ASP

Set msg = CreateObject("CDO.Message")
msg.Configuration.Fields.Item( "http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
msg.Configuration.Fields.Item( "http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
msg.Configuration.Fields.Item( "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
msg.Configuration.Fields.Update

msg.To = "BearPassEmail@missouristate.edu"
msg.From = "webserver@missouristate.edu"
msg.Subject = "Sample Email Subject"
msg.TextBody = "Sample Email Message Body"
msg.Send

set msg=nothing

ASP.Net (C#)

Add the following to the web.config file:
<system.web>
    <compilation>
        <assemblies>
            <add assembly="WebServices.Email, Version=1.0.0.0, Culture=neutral, PublicKeyToken=05E1FECE8F9B620C"/>
        </assemblies>
    </compilation>
</system.web>
Add the following to the aspx file:
<script runat="Server" language="C#">
protected void page_load(object sender, EventArgs e)
{
    WebServices.Email.Send.Text("recipient@missouristate.edu", "sender@missouristate.edu", "Sample Email Subject", "Sample Email Message Body");
}
</script>