mail attachment

Discussion in 'ASP General' started by vinodkus@gmail.com, Sep 7, 2007.

  1. Guest

    dear sir/maadm

    I have to send a mail attachment but my problem is that file name of
    my attachment should be changed that i will write in a text box.
    please suggest any solution

    Thanks in Advance
    , Sep 7, 2007
    #1
    1. Advertising

  2. <> wrote in message
    news:...
    > dear sir/maadm
    >
    > I have to send a mail attachment but my problem is that file name of
    > my attachment should be changed that i will write in a text box.
    > please suggest any solution
    >


    Are you using CDOSYS?

    Having called AddAttachment you can modify the disposition field to the
    correct name:-

    Dim oPart : Set oPart = oMsg.AddAttachment(sPathToFile)
    oPart.Fields("urn:schemas:mailheader:content-disposition").Value =
    "attachment; file=""" & sFileName & """"
    oPart.Fields.Update

    Where oMsg is a CDOSYS Message object and sFileName is the name you want the
    attachment to have in the email.

    --
    Anthony Jones - MVP ASP/ASP.NET
    Anthony Jones, Sep 7, 2007
    #2
    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:
    322
    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. tma

    Mail Attachment problem

    tma, Jul 30, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    406
Loading...

Share This Page