<html>
<head>
<title></title>
<link rel="stylesheet" href="../css/style.css" type="text/css">
</head>
<body>
<h2 align="center">:: Send en ny mail</h2>
<table align="left">
<form action="sendmail.asp?mode=send" method="post">
<tr><td valign="top">
<p>Din E-mail: </p>
</td>
<td valign="top">
<input type="text" name="afsender" size="30" class="form">
</td></tr>
<tr><td valign="top">
<p>Dit navn: </p>
</td>
<td valign="top">
<input type="text" name="afsendernavn" size="30" class="form">
</td></tr>
<tr><td valign="top">
<p>Emne: </p>
</td>
<td valign="top">
<input type="text" name="emne" size="30" class="form">
</td></tr>
<tr><td valign="top">
<p>E-mail: </p>
</td>
<td valign="top">
<textarea rows="15" cols="100" name="mail" class="form"></textarea>
</td></tr>
<tr><td valign="top">
</td>
<td valign="top">
<input type="Submit" name="submit" value="..:: Send Mail ::" class="sms">
</td></tr>
</form>
<tr><td valign="top">
</td>
<td valign="top"><br><br>
<p>Bemærk: Alle HTML koder er tilladte !</p>
</td></tr>
</table>
</body>
</html>
<% If Request.Querystring("mode") = "send" Then
Dim mailtext, email
If Request.Form("modtager") = "" or Request.Form("mail") = "" Then
mailtext = "<div align=""center"" style='font-size:16px; color: red; font-weight: bold; font-family: ""Times New Roman"";'>Alle felter skal udfyldes !</div>"
Response.Write mailtext
Else
'******** BESKED SENDES START ********
'--------------ASPEmail start---------------------
email = Replace(Request.Form("mail"),vbCrLf,"<br>") ' Her bliver alle tryk på enter erstattet af <br>
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "mailserver"
Mail.From = Request.Form("afsender")
Mail.FromName = Request.Form("afsendernavn")
Mail.AddAddress "dinmail"
Mail.Subject = Request.Form("emne")
Mail.isHTML = True
Mail.Body = email
On Error Resume Next
Mail.Send
Response.Redirect("mailsendt.asp")
End If
End If
%>
Er et simpelt eksempel.. det kan sagtens udvides mere.. Dokumentationen til ASPEmail, kan ses på
www.aspemail.com ...