T
tma
I am exporting a Crystal report to a .pdf. My problem is that when I attach the file to a message with the below code, the file attachment is truncated and will not open. As an aside, I'm using Mercury/32 as a mail server. I have not tested this using XP Pro mail services.
Any help is greatly appreciated.
Dim mailMsg As New MailMessage
With mailMsg
..From = "(e-mail address removed)"
..To = oApplicant.Email
..Bcc = "(e-mail address removed)"
..Subject = "Your Application"
..BodyFormat = MailFormat.Html
'Dim mailAttachment As MailAttachment
If Not Session("Fname") Is Nothing Then
Dim Fname As String = Session("Fname")
..Attachments.Add(New MailAttachment(Fname))
End If
End With
SmtpMail.SmtpServer = "127.0.0.1"
SmtpMail.Send(mailMsg)
Any help is greatly appreciated.
Dim mailMsg As New MailMessage
With mailMsg
..From = "(e-mail address removed)"
..To = oApplicant.Email
..Bcc = "(e-mail address removed)"
..Subject = "Your Application"
..BodyFormat = MailFormat.Html
'Dim mailAttachment As MailAttachment
If Not Session("Fname") Is Nothing Then
Dim Fname As String = Session("Fname")
..Attachments.Add(New MailAttachment(Fname))
End If
End With
SmtpMail.SmtpServer = "127.0.0.1"
SmtpMail.Send(mailMsg)