Page 1 of 1

Thunderbird

Posted: Mon Jul 11, 2011 10:09 pm
by Blessed
Hello everyone

I have clients, who prefer Thunderbird as a client of e-mail.
Since I can do to use the thunderbird instead of outlook.

it is possible with Fivewin, or some bookstore especially of third.

Regards

Re: Thunderbird

Posted: Tue Jul 12, 2011 5:52 am
by anserkk
I am not sure about using Thunderbird via OLE. The below given code should work

Code: Select all

Function SendThunderbird(cTo, cSubject, cBody) 
     
    // This function can be used to send an e-mail from Mozilla Thunderbird.
    // The syntax for calling Thunderbird from a command line (DOS prompt) is:
    //
    // thunderbird -compose "mailto:somebody@somewhere?cc=address@provider&subject=hi&body=something"

    Local cCommand,oShell
         
    cCommand = "C:\Program Files\Mozilla Thunderbird\thunderbird" 
     
    cCommand = cCommand + " -compose " + Chr(34) + "mailto:" + cTo + "?" 
    cCommand = cCommand + "subject=" + Chr(34) + cSubject + Chr(34) + "&" 
    cCommand = cCommand + "body=" + Chr(34) + cBody + Chr(34) 

    oShell:=CreateObject("WScript.Shell")
    oShell:Run(cCommand,0,.F.)
    SysWait(1) 
    oShell:=NIL
 
Return
Regards
Anser