Hi,

I have set up an automatic email system that send a message and an
attachemnt (pdf) to a user. It works in that the user receives the email but
the attachment arrives in a '.dat' format instead of '.pdf'. Here is my
code:

<%
Set mail = Server.CreateObject("CDONTS.NewMail")
mail.AttachURL "C:\inetpub\wwwroot\logiweb\dealer\MSDS\0CON\196.p df",
"test.pdf"
mail.From = MSDS_request@domain
mail.To = Trim(Request.QueryString("Email"))
mail.subject ="MSDS Document downloaded"
mail.body = "<table width=""600"" border=""0"" cellspacing=""0""
cellpadding=""0"">" & "<tr>" & "<font face=Arial size=2>" & "Thank you for
requesting a " & (MSDS.Fields.Item("description").Value) & " MSDS
information sheet from us." & "</font>" & "</tr>" & "</table>"

mail.MailFormat = 0
mail.BodyFormat = 0
mail.Body = HTML
mail.Send
Set mail = nothing
%>

The recipient receives an email with an attachment titled 'ATT272276.dat'
Every time I send it, the name of the attachment changes. How can I get it
to send it as a pdf?

Thanks