|
-
Oct 21st, 2003, 04:45 PM
#1
Thread Starter
New Member
Mailto: and attachments
Using mailto: protocol We can specify the address, the subject, and the body of
a message but we cannot create an attachment.
I could send an email from the server but that will
require showing to the user all possible addresses to
send that mail to.
Instead I'd like to use client side because the user will
be able to specify an address to send to from his local
address book.
So, how can I open new mail form on the client (Browser) and add an attachment?
Thanks,
Mark
-
Oct 21st, 2003, 09:12 PM
#2
Hyperactive Member
Use MAPI http://support.microsoft.com/default...b;en-us;113033 or use Outlook Objects.
Both are long journeys, requring lots of food, water, and installed ocx's or dll's.
-
Oct 22nd, 2003, 05:01 AM
#3
Frenzied Member
You can add an attachment to the MailTo command using things like:
& "&attach=" & Chr(34) & strFileName & Chr(34)
-
Oct 22nd, 2003, 08:56 AM
#4
Thread Starter
New Member
But as far as mailto: goes it does not support attachment commands. Correct me if I am wrong.
-
Oct 22nd, 2003, 08:59 AM
#5
Frenzied Member
I haven't tried it, but other people have, and they seem to feel that MailTo: does allow attachments, and they are specified as shown 2 posts above....
-
Oct 22nd, 2003, 09:05 AM
#6
Thread Starter
New Member
This is my code. What is wrong with it?
<A HREF="mailto:[email protected]?subject=Menu component feedback&body=test&attach=C:\test1.png">email</A>
-
Oct 22nd, 2003, 09:09 AM
#7
Frenzied Member
This is how I would use it - from a VB program:
VB Code:
Declare Function ShellExecute Lib "shell32.dll" Alias _
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation _
As String, ByVal lpFile As String, ByVal lpParameters _
As String, ByVal lpDirectory As String, ByVal nShowCmd _
As Long) As Long
Dim strSubject As String: strSubject = "Test E-Mail"
Dim strBody As String: strBody = "This is a test. " & "Blah"
ShellExecute 0&, vbNullString, _
"mailto:" & strAddress & _
"?subject=" & strSubject & _
"&body=" & strBody, vbNullString, "C:\", vbNormal
'Can also add an attachment using:
'& "&attach=" & Chr(34) & strFileName & Chr(34)
That shows that attachment names have " (Chr34) around them. Also, you may need more " in your example....
-
Oct 22nd, 2003, 09:21 AM
#8
Frenzied Member
and MailTo works OK from a VB program, with an attachment.
Maybe when called from a web page there is a restriction on the implementation of MailTo to prevent you sending any file from someone elses computer?
Or maybe the web page can't see the local disk??
-
Oct 22nd, 2003, 09:35 AM
#9
Thread Starter
New Member
This does not attach a file:
<A id="id1" HREF="">email</A>
<script>
strFileName = "http://mgoldinxp/mailto/test1.png"
document.all.id1.href = "mailto:[email protected]?subject=Menu component feedback&body=test" + "&attach=" + '"' + strFileName + '"'
</script>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|