Home  |  Index  |  Dotnet4all Snippets  |  Submit resources
About  |  Mail us  
Dotnet4all Logo

  How to add an attachment to an expression mailto (Friday, October 08, 2004)




Found the following interesting discussion in the Newsgroups:

add an attachment to an expression mailto
by:toufik

Hi,
How can we add an attachment to an email using mailto,
I've this code to open a new email window (default email), it works but I
like to add an attachment to it

Dim mailMess As String = "mailto:" & ReplaceSpecialCharacters(mailTo)
mailMess = mailMess & "?Subject=" &
ReplaceSpecialCharacters(mailSubject)
mailMess = mailMess & "&Body=" & ReplaceSpecialCharacters(mailText)
System.Diagnostics.Process.Start(mailMess)

I've tried this but doesn't work...
mailMess = mailMess & "&Attach='" & ReplaceSpecialCharacters(attachement) &
"'"



 Reply:
by:Cor Ligthert

 Hi Toufik,

With the default mailclient you cannot add attachments.

When you use by instance smtp mail (system.web.mail) or (Office) Outlook it
is possible.

I hope this helps?

Cor


 Reply:
by:hirf-spam-me-here@gmx.at (Herfried K. Wagner [MVP])

 
It depends on what newsreader you are using. Some newsreaders expect
'&att', some don't support it at all.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>








0 Comments:

Post a Comment

 
Previous Posts
    - Windows Forms datagrid won't show more than 255 ro...
    - How to create an About Dialog
    - equivalent of a Session variable in Windows Forms?...
    - Webbrowser and Fake filename into the IMG src attr...
    - How to send Crystal Reports report by email
    - Hiding a form's Close ControlBox button
    - How to Deactivate all MDI child forms
    - Typed dataset and the grid control
    - About Events in datagrid and SelectedIndexChanged
    - How to get SQL Server Timestamp value

Archives
    - 10/03/2004 - 10/10/2004
    - 10/10/2004 - 10/17/2004
    - 10/17/2004 - 10/24/2004
    - 10/24/2004 - 10/31/2004
    - 10/31/2004 - 11/07/2004
    - 11/21/2004 - 11/28/2004
    - 11/28/2004 - 12/05/2004
    - 12/05/2004 - 12/12/2004
    - 12/12/2004 - 12/19/2004
    - 12/19/2004 - 12/26/2004
    - 12/26/2004 - 01/02/2005
    - 01/23/2005 - 01/30/2005
    - 01/01/2006 - 01/08/2006
    - 09/24/2006 - 10/01/2006

Disclaimer & Terms of Use  | DotNet4All.Com concept & © 2004 - 2007 by  Zelders²  - Holland