DotNetted - Windows hosting specialists
 
 
   
General Support
Domain Names
Default Documents
SSL Shared Cert
ASP 500 error message
Pre-installed Files
Publishing Your Site
Uploading with FTP
FrontPage/Visual Studio
Using DreamWeaver
E-Mail
Greylisting (important)
Setup pop3 and smtp
Using webmail
E-mail administration
Configure spam filters
Databases
Access Database
SQL Server 2005
SQL Server 2000
Scripting
ASP Mail Script
ASP Form To E-Mail
ASP Send Secure E-Mail
Other ASP Components
Session State for .NET
Send mail with .NET 1.1
Send mail with .NET 2+
Upload file using .NET
Contact tech support

Send mail using .NET 2.0

Sending e-mail through scripts under the .NET 2.0 framework is different to the 1.1 framework as System.Web.Mail has now been replaced by System.Net.Mail with an entirely different set of properties / methods.

Below is a simple script to send an e-mail using the DotNetted mailserver and authentication under .NET 2.0 :

<%@ Import Namespace = "System.Net.Mail" %>

<%

' Create a new MailMessage object and specify the "From" and "To" addresses
Dim Email As New System.Net.Mail.MailMessage("you@yourdomain.co.uk", "whoever@therecipient.co.uk")

' Set Mail subject and body text
Email.Subject = "Enter your mail subject here"
Email.Body = "Enter your body text here"

' Create SmtpClient object
Dim mailClient As New System.Net.Mail.SmtpClient()

' Create object to store authentication username and password
Dim basicAuthenticationInfo As New System.Net.NetworkCredential("you@yourdomain.co.uk", "*password_for_that_mailbox*")

' Set mail server address
mailClient.Host = "smtp.dotnetted.co.uk"

' Do not use default security credentials
mailClient.UseDefaultCredentials = False

' Do use those specified above
mailClient.Credentials = basicAuthenticationInfo

' Send e-mail
mailClient.Send(Email)

%>

That's it - you just need to substitute your to, from, username and password values and you should be able to copy this script to your account and send your first e-mail.

Please Note : as we use authentication the 'mail.From' e-mail address must be a live user on our mailserver matching the address used for the username (this must be an actual username and not an Alias).

reliability and security
separate application for each site
unique 'sandboxed' user per site
windows 2008 / IIS 7 web hosting
windows 2003 / IIS 6 web hosting
virus / spam protection
all incoming e-mail virus checked
fully configurable spam filtering
scripting support
full support - asp.net version 1.1
full support - asp.net version 2.0
full support - asp.net version 3.0
full support - asp.net version 3.5
full support - asp.net version 4.0
full support - asp 'classic' 3.0
quality asp components installed
complete e-mail service
pop3 and smtp e-mail services
industry leading webmail interface
web based administration interface
development software
compatible with dreamweaver
compatible with visual studio .net
compatible with MS frontpage
database support
MS access databases included
sql server 2000 database £6 mth
sql server 2005 database £6 mth
statistics reporting
comprehensive web based stats
pre-defined or custom stats reports
optional SSL support
shared SSL access just £1 / month
your own SSL cert just £5 / month
 
Copyright © DotNetted - All Rights Reserved Prices are subject to VAT @ 17.5%