mail attachment

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
vinodkus [ Fr, 07 September 2007 10:50 ] [ ID #1814825 ]

Re: mail attachment

<vinodkus [at] gmail.com> wrote in message
news:1189155030.417940.83520 [at] w3g2000hsg.googlegroups.com...
> 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").V alue =
"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 [ Fr, 07 September 2007 13:32 ] [ ID #1814828 ]
Webserver » microsoft.public.inetserver.asp.general » mail attachment

Vorheriges Thema: ASP in Vista
Nächstes Thema: Long forms repaint from top when server side controls get processe