Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automation of MAPI (Free solution)
Message
De
09/04/2003 03:49:30
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
08/04/2003 23:17:23
Agnes Cheng
DynamicTech Consultants Ltd.
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00775332
Message ID:
00775366
Vues:
21
>pTo = "abc@abc.com"
>pSubject = "Testing Mail"
>pMsg = 'hello'
>pCC = ''
>pFrom = ''
>
> oform = CreateObject("form")
> oform.addobject("Session1","olecontrol","MSMAPI.mapiSession")
> oform.addobject("Message1","olecontrol","MSMAPI.mapiMessages")
> oform.Session1.signon
> oform.Message1.sessionid = oform.Session1.sessionid
> oform.Message1.compose
> oform.Message1.msgsubject = pSubject
> oform.Message1.msgnotetext = pMsg
> oform.Message1.RecipAddress = pTo
> oform.Message1.RecipType = 1
> oform.Message1.ResolveName()
>
> keyboard "{Enter}" <----------
> nodefault <---------
> oform.Message1.send(.f.)
>
>Just Add two lines, the mail will be sent without "press [Send]"
>This solution is provdied by [Leonid] from 'microsoft.public.fox.programmer.exchange'
>
>From Agnes

Agnes,
That solution is in solution.app since VFP3.0 ( You don't need keyboard '{enter}' and nodefault)
You also don't need to create a form for this to work.
However be carefull this sets default directory to MAPI folder. You should reset it back. Also with Outlook it only puts it in Outbox. You still need to take action to send immediately :(
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform