| View previous topic :: View next topic |
| Author |
Message |
pj Newbie
Joined: 26 Apr 2002 Posts: 11
|
Posted: Fri Apr 26, 2002 9:18 pm Post subject: VDS and Email |
|
|
I know there are smtp and pop dlls available, but is there a way to send mail with an attachment using whatever the default email client is? I am writing an app that will be used at many locations where I do not know the smtp server and need to use the user's default email program instead.
Any ideas? I need this to work reliably on win95,98,nt and 2000
Thanks |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Fri Apr 26, 2002 11:28 pm Post subject: |
|
|
run "mailto:garrett@eyrisdev.com"?subject=Testing
-Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
pj Newbie
Joined: 26 Apr 2002 Posts: 11
|
Posted: Sat Apr 27, 2002 8:57 am Post subject: VDS and Email |
|
|
I need to specify all of
To
CC
BCC
Subject
body
attachment name
I didn't think that Mailto could do this?
I am hoping someone knows to access the MAPI mail recipient or something similar
Thanks
PJ |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Sat Apr 27, 2002 9:03 am Post subject: |
|
|
Not that this helps with the attachment problem but you can also put in the CC, BCC and Body of your e-mail like this:
| Code: |
SHELL OPEN,"mailto:email@address.com?subject=Testing&cc=mail2@address.com&bcc=mail3@address.com&body=Body of message here."
|
Note: I use SHELL OPEN because RUN doesn't like spaces, whether I use quotations around it or not.
Also, Tommy the "[code:1:a341181023]" command seems to replace &'s with &. _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Sat Apr 27, 2002 12:28 pm Post subject: |
|
|
I came across the same problem with spaces in the RUN command and will now use your idea, SnarlingSheep.
What about attaching an attachment using the SHELL command - what is the correct syntax?
Serge _________________
|
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Sat Apr 27, 2002 6:28 pm Post subject: |
|
|
I've looked around a bit and can't think of an easy way to specify attachments.
"mailto:" doesn't support attachments.
"MAPI" does but VDS doesn't support it(as far as I know anyway).
Netscape and Outlook both have a program in the SendTo folder(@WINDIR()\SendTo) that allows you to send a file to their e-mail clients. If you can figure out their command line arguments you might be able to do something like that.
Probably the hardest way would be to figure out the user's default mail program in the registry, RUN it and send keystrokes/mouse clicks with the WINDOW command.
Perhaps someone that knows Delphi or C++ could make a commandline program that would send the mail through MAPI using the arguments supplied by a VDS program?
Delphi MAPI Source Code: http://www.thescarms.com/VBasic/MapiEmail.asp
Good luck. _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Sat Apr 27, 2002 11:55 pm Post subject: |
|
|
Thanks for trying. I've looked into it on and off for quite some time and found nothing straight forward using MAILTO .
Serge _________________
|
|
| Back to top |
|
 |
moke Contributor

Joined: 02 Jan 2002 Posts: 162
|
Posted: Mon Apr 29, 2002 8:00 pm Post subject: |
|
|
I had the same problem. The way I got around it was to use the mail server for one of the websites that is being hosted for me. Apparently, some hosting companies provide generic mail services that do not require validation. This allowed me to use the VDSIPP dll and put in a default mail server. So even if a user doesn't plug in their mail server to my app it will default to a generic mail server that allows the mail to go through without validation. If you have access to something like that you might want to look into it.
moke |
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Wed May 14, 2003 2:57 pm Post subject: |
|
|
Struggled with this problem also - sending mail + an attachment through the user's default mail program.
Found no VDS solution to it, but I found this freeware commandline utility that will ship a file using MAPI
interface.
http://say.city.tomsk.net/soft_e.htm
Syntax:
| Code: | | RUN mailmapi.exe attachment.doc |
Works fine. Only drawback is that you cannot specify a To: mail address.
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1565
|
Posted: Wed May 14, 2003 4:34 pm Post subject: |
|
|
| SnarlingSheep that page you listed is source for a Visual Basic MAPI application not for Delphi. |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Wed May 14, 2003 6:34 pm Post subject: |
|
|
Hey Skit!
Wake up
| PGWARE wrote: | | SnarlingSheep that page you listed is source for a Visual Basic MAPI application not for Delphi. |
That app is in VB all right..
The one I mentioned is in C++
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Wed May 14, 2003 6:40 pm Post subject: |
|
|
Were we all drinking? _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
|