Outlook Express: Attachment problem
I am sending a MS Word document (a.doc) using the following codes. All are ok except that the attachement becomes a.doc.dat
when I open it the mail with Outlook Express. Why .dat is auto added? Is it problem with the application, or Outlook Express?
Any advice is highly appreciated!
----------------------------------------------------------------------
Dim msg As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage()
msg.To = Email1.Trim
msg.Cc = Email2.Trim
msg.Bcc = Bcc.Trim
msg.From = sFrom
msg.Subject = Subject
msg.BodyFormat = MailFormat.Html
msg.Body = "<p>Dear abc, attached is the doc file"
Dim myAttachment As New MailAttachment(AttachmentPath, MailEncoding.Base64)
msg.Attachments.Add(myAttachment)
Try
SmtpMail.SmtpServer = sServer
SmtpMail.Send(msg)
SendMail = "Success"
Catch ehttp As System.Web.HttpException
SendMail = ehttp.ToString
End Try