CDONTS:
<%
Set myMail = CreateObject("CDONTS.NewMail")
myMail.From = "test@test.com"
myMail.To = "test@test.com"
myMail.Subject = "Test Subject"
myMail.BodyFormat = 0
myMail.MailFormat = 0
myMail.Body = HTML
myMail.Send
%>
Subject: CDONTS not supported by Microsoft Windows Server 2003
Article #850
Unfortunately, the CDONTS component cdonts.dll was not updated by Microsoft to work properly on Windows Server 2003. However, the older version can be registered on the server to work.
The side effect of using CDONTS on Windows Server 2003 is that sometimes email will fail. The symptom is after an email message is sent with CDONTS, the message will not arrive until the email service is restarted.
Listed below are supporting documentation containing further details. You may want to consider changing your email method from CDONTS to CDOSYS, which has been updated for Windows Server 2003 and is easy to convert.
CDOSYS:
<%
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.Sender = "email@domain.com"
objMessage.To = email@domain.com
objMessage.TextBody = "This is some sample message text."
objMessage.Send
%>
ASP EMAIL:
Subject: AspEmail Component Example
Article #774
This article will cover the basics on how to use the AspEmail Component with your hosting account's SMTP Authentication. For additional information on features and more examples in ASP and ASP.NET, visit the link below.
AspEmail Manual:
http://www.aspemail.com/manual.html
The below script will demonstrate how to send messages with the AspEmail component using SMTP Authentication.
<%
'This prevents the form from being Cached.
Response.Expires = 0
Response.Expiresabsolute = Now-1
'Create the MailSender Object
Set Mail = Server.CreateObject("Persits.MailSender")
'Specify your SMTP Mail Server
Mail.Host = "mail.yourdomain.com"
'Specify the From Address and Name
Mail.From = "noreply@yourdomain.com"
Mail.FromName = "Name at YourDomain "
'Specify whom will get the message
Mail.AddAddress "toyou@yourdomain.com", "Your Name "
'Specify the Message Subject and Body
Mail.Subject = "Persits AspEmail Test "
Mail.Body = "Your Message Body "
'Specify of the message is plain text or HTML
Mail.IsHTML = False
'Catch All Errors
On Error Resume Next
'Try to send the message
Mail.Send
'If there is an error, print it out, if the message sends ok, show success!
If Err <> 0 Then ' error occurred
response.write("Message Error: " & Err.Description)
else
response.write("Your Message has been sent!")
End If
'Close the Message Object to clear it from memory
Set Mail = Nothing
%>
# SendToQueue method - places a message in a message queue to be retrieved and sent out by the EmailAgent NT service.
# AddEmbeddedImage method - specifies an image to be embedded into a message body.
# AppendBodyFromFile method - reads the message body from a file.
# ContentTransferEncoding property - specifies the Content-Transfer-Encoding MIME header for the message body. If you set this property to "quoted-printable" AspEmail will automatically convert the message body to the Quoted-Printable format which enables you to send messages in non-US ASCII alphabets.
# AltBody property - specifies an alternative text version of the message body to support email clients that are not HTML-enabled.
# CharSet property - specifies the charset component of the Content-Type MIME header. Useful when sending messages in non-US ASCII alphabets.
# Username and Password properties - specify user credentials to be used for AUTH LOGIN authentication against the SMTP server.
# SendToNewsgroup - sends a message (article) to a newsgroup using the NNTP protocol.
-----
Subject: ValidateAddress Function in ASPEmail
Article #902
ValidateAddress (Address As String) As Integer (ASPEmail Version 5.0.0.4)
This performs the syntactic validation of a specified email address. You can utilize this method on a user-specified address to make sure its syntax is valid. This method does NOT determine if an email address actually exists. It returns the following values:
0 - Valid address
1 - Too short
2 - Too long (greater than 256 chars)
3 - No @ character
4 - Nothing before @
5 - Characters before @ must be a-z A-Z 0-9 ' _ . -
6 - No dots after @
7 - Zero-length subdomain
8 - Characters in a subdomain must be a-z A-Z 0-9 -
9 - Characters in a top-level subdomain must be a-z A-Z 0-9
10 - Top-level subdomain must be at least 2 characters long
11 - Name part of address cannot start or end with a dot.
Tags: -
Related entries:
Last update: 2010-01-31 02:51
Author: Administrator
Revision: 1.2