Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Mail Attachment problem

Reply
Thread Tools

Mail Attachment problem

 
 
tma
Guest
Posts: n/a
 
      07-29-2004
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 Removed)"

..To = oApplicant.Email

..Bcc = "(E-Mail 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)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem - Multipart in mail attachment =?Utf-8?B?Tmljb2w=?= ASP .Net 0 09-22-2007 12:02 AM
Problem in receving mail with attachment patelvinay.visnagar@gmail.com ASP .Net 2 11-10-2005 01:17 PM
TB fail to send mail with attachment Klaus Firefox 3 08-18-2005 10:07 PM
reply to e-mail without its attachment Davide Firefox 6 11-13-2003 02:25 PM
creating an e-mail with a dynamic word attachment Bertus Dam ASP .Net 0 08-26-2003 10:59 AM



Advertisments