e-mail attachement ?

  • 15 years ago

    I'm creating windows application.

    when a button is pressed I need to open new  e-mail and attach specefied file to that newly opened e-mail.
    in new e-mail massage "send to" field doesn't have to be specified. (address)

    for any help thanx.

  • 15 years ago

    If you want to send the message through your own application I suggest you look up the System.Web.Mail.MailMessage class, which will provide sample code.  If you want to send it through the user's normal e-mail client then that's a different story.  You can open a new mail message in the default e-mail client by calling Process.Start and passing a mailto URL, but I doubt, although I don't know for sure, that you can specify attachments that way.  You would probably have to let the user do that themselves or use COM to control the client yourself, although then you'd have to know exactly what client it was.

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“It works on my machine.” - Anonymous