>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