Mail Attachment problem

Discussion in 'ASP .Net' started by tma, Jul 30, 2004.

  1. tma

    tma Guest

    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 = ""

    ..To = oApplicant.Email

    ..Bcc = ""

    ..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)
    tma, Jul 30, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    497
    Paul Lesnikowski
    Nov 10, 2005
  2. Bertus Dam
    Replies:
    0
    Views:
    445
    Bertus Dam
    Aug 26, 2003
  3. Chris Welch
    Replies:
    1
    Views:
    320
    S. Justin Gengo
    Nov 25, 2003
  4. Cantekin Guneser

    sending mail with attachment

    Cantekin Guneser, Apr 18, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    300
    John Timney \(ASP.NET MVP\)
    Apr 18, 2004
  5. =?Utf-8?B?Tmljb2w=?=

    Problem - Multipart in mail attachment

    =?Utf-8?B?Tmljb2w=?=, Sep 22, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    326
    =?Utf-8?B?Tmljb2w=?=
    Sep 22, 2007
Loading...

Share This Page