472,126 Members | 1,561 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,126 software developers and data experts.

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

Sep 7 '07 #1
1 1987

<vi******@gmail.comwrote in message
news:11*********************@w3g2000hsg.googlegrou ps.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").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
Sep 7 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by PeterR | last post: by
2 posts views Thread by knoak | last post: by
reply views Thread by imre.adam | last post: by
1 post views Thread by theWizard1 | last post: by
2 posts views Thread by eng.sharif | last post: by
2 posts views Thread by Ruud | last post: by
1 post views Thread by nukephp | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.