|
Home > Archive > FoxPro Help and Support > October 2005 > Email attachemnt
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| One of my apps has a command button used for sending an email. The code
behind the button is as follows:
DECLARE INTEGER ShellExecute ;
IN SHELL32.DLL ;
INTEGER nWinHandle,;
STRING cOperation,;
STRING cFileName,;
STRING cParameters,;
STRING cDirectory,;
INTEGER nShowWindow
lcEmailAddress = emailto
lcSubject = "Imported Files"
lcMessageBody = f.filename
ShellExecute(0, "", "mailto:" + lcEmailAddress + "?Subject=" + lcSubject +
;
"&body=" + lcMessageBody, "", "",1)
Is there a paramter I can add to attach a file to the email?
Thanks in advance,
Jack
| |
| Lee Mitchell 2005-10-27, 8:34 am |
| Hi Jack:
Take a look at this article for code on sending attachments via e-mail:
http://support.microsoft.com/defaul...KB;EN-US;181899
This uses the MSMAPI ocx control.
I hope this helps.
This posting is provided "AS IS" with no warranties, and confers no rights.
Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell
*-- VFP9 HAS ARRIVED!! --*
Read about all the new features of VFP9 here:
http://msdn.microsoft.com/vfoxpro/
*--Purchase VFP 9.0 here:
http://www.microsoft.com/PRODUCTS/i...cid=54787e64-52
69-4500-8bf2-3f06689f4ab3&type=ovr
Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/gp/lifeselectindex
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003
>One of my apps has a command button used for sending an email. The code
>behind the button is as follows:
> DECLARE INTEGER ShellExecute ;
> IN SHELL32.DLL ;
> INTEGER nWinHandle,;
> STRING cOperation,;
> STRING cFileName,;
> STRING cParameters,;
> STRING cDirectory,;
> INTEGER nShowWindow
> lcEmailAddress = emailto
> lcSubject = "Imported Files"
>lcMessageBody = f.filename
> ShellExecute(0, "", "mailto:" + lcEmailAddress + "?Subject=" + lcSubject
+
;
> "&body=" + lcMessageBody, "", "",1)
>Is there a paramter I can add to attach a file to the email?
>Thanks in advance,
>Jack
| |
|
| Thanks Lee. It looks like it will.
One part I haven't resolved is how to send the email without user
intervention.
Any ideas anyone?
Thanks
"Lee Mitchell" <Leemi@online.microsoft.com> wrote in message
news:i2P2E%23ozFHA.3464@TK2MSFTNGXA02.phx.gbl...
> Hi Jack:
>
> Take a look at this article for code on sending attachments via e-mail:
> http://support.microsoft.com/defaul...KB;EN-US;181899
>
> This uses the MSMAPI ocx control.
>
> I hope this helps.
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> Sincerely,
> Microsoft FoxPro Technical Support
> Lee Mitchell
>
> *-- VFP9 HAS ARRIVED!! --*
> Read about all the new features of VFP9 here:
> http://msdn.microsoft.com/vfoxpro/
>
> *--Purchase VFP 9.0 here:
> http://www.microsoft.com/PRODUCTS/i...cid=54787e64-52
> 69-4500-8bf2-3f06689f4ab3&type=ovr
>
> Keep an eye on the product lifecycle for Visual FoxPro here:
> http://support.microsoft.com/gp/lifeselectindex
> - VFP5 Mainstream Support retired June 30th, 2003
> - VFP6 Mainstream Support retired Sept. 30th, 2003
>
>
>
>
> +
> ;
>
>
>
>
| |
| Lee Mitchell 2005-10-27, 8:34 am |
| Hi Jack:
What user intervention are you talking about?
I hope this helps.
This posting is provided "AS IS" with no warranties, and confers no rights.
Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell
*-- VFP9 HAS ARRIVED!! --*
Read about all the new features of VFP9 here:
http://msdn.microsoft.com/vfoxpro/
*--Purchase VFP 9.0 here:
http://www.microsoft.com/PRODUCTS/i...cid=54787e64-52
69-4500-8bf2-3f06689f4ab3&type=ovr
Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/gp/lifeselectindex
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003
>Thanks Lee. It looks like it will.
>One part I haven't resolved is how to send the email without user
>intervention.
>Any ideas anyone?
>Thanks
>"Lee Mitchell" <Leemi@online.microsoft.com> wrote in message
>news:i2P2E%23ozFHA.3464@TK2MSFTNGXA02.phx.gbl...
> Hi Jack:
>
> Take a look at this article for code on sending attachments via e-mail:
> http://support.microsoft.com/defaul...KB;EN-US;181899
>
> This uses the MSMAPI ocx control.
>
> I hope this helps.
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> Sincerely,
> Microsoft FoxPro Technical Support
> Lee Mitchell
>
> *-- VFP9 HAS ARRIVED!! --*
> Read about all the new features of VFP9 here:
> http://msdn.microsoft.com/vfoxpro/
>
> *--Purchase VFP 9.0 here:
>
http://www.microsoft.com/PRODUCTS/i...cid=54787e64-52
> 69-4500-8bf2-3f06689f4ab3&type=ovr
>
> Keep an eye on the product lifecycle for Visual FoxPro here:
> http://support.microsoft.com/gp/lifeselectindex
> - VFP5 Mainstream Support retired June 30th, 2003
> - VFP6 Mainstream Support retired Sept. 30th, 2003
>
>
>
>
> +
> ;
>
>
>
>
| |
|
| The way suggested by Lee doesnt require any intervention.
You would be controlling all aspects under program control.
The way your were first doing it does require intervention because you
are shelling to the computers mail program. and the user needs to click
send. big difference.
jack wrote:
> Thanks Lee. It looks like it will.
>
> One part I haven't resolved is how to send the email without user
> intervention.
>
> Any ideas anyone?
>
> Thanks
>
>
> "Lee Mitchell" <Leemi@online.microsoft.com> wrote in message
> news:i2P2E%23ozFHA.3464@TK2MSFTNGXA02.phx.gbl...
>
>
>
| |
|
| Lee Mitchell wrote:
> Hi Jack:
>
> What user intervention are you talking about?
Maybe he's talking about the Outlook 'a program is trying to send an
email' message?
--
Paul
|
|
|
|
|