<code>
<%
Dim myMail
Set myMail = Server.CreateObject("CDO.Message")
With myMail ' Set message attributes
myMail.Subject = "my attachment"
myMail.From = "
[email protected]"
myMail.To = "
[email protected]"
Mymail.htmlBody = "Attached is my file"
'Mymail.TextBody = "Attached is my file"
' Attachment using known static physical path
'.AddAttachment "c:\somepath\somefile.txt"
' Attachment using mappath to find the physical path
.AddAttachment Server.MapPath("foldername/filename.xls")
' Send message - uncomment the following line only
' AFTER you've entered appropriate To and From
' addresses above. Then the script will actually
' send the messages.
'Send
End With
myMail.Send
Set objMessage = Nothing
%>
</code>