Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to email outllook with attachments
Message
From
01/03/2004 20:53:46
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
How to email outllook with attachments
Miscellaneous
Thread ID:
00882218
Message ID:
00882218
Views:
57
i have used this code to send email from within vfp6,
email("me@nowhere.com","boss@mycompany.com")
Function email
Lparameters cUrlto,cUrlcc
cFile = Sys(2023) + Sys(3) + '.URL'
If File(m.cFile)
    Erase (m.cFile)
Endif
nFh = Fcreate(m.cFile)
If m.nFh < 0
    Wait "Can't create a temporary file for the email" Window Nowait
    Return
Endif
= Fputs(m.nFh,'[InternetShortcut]')
= Fwrite(m.nFh,'URL=mailto:' + cUrlto)
= Fwrite(m.nFh,"?CC= &cUrlcc&Subject=Meet for lunch&Body=Please join me and the gang for lunch tomorrow")
= Fflush(m.nFh)
= Fclose(m.nFh)
Run /N2 Start &cFile
Return .T.
Endfunc
how can i add attachments to this email? or is there any better code to send email using outlook with attachments?
Next
Reply
Map
View

Click here to load this message in the networking platform