Microsoft Outlook 2003

Microsoft Outlook 2003

Postby MdaSolution » Sat Apr 24, 2010 12:12 pm

How I can send email and attack from my application into Outlook 2003 ?
Any test sample ?
tks
FWH .. BC582.. xharbour
User avatar
MdaSolution
 
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: Microsoft Outlook 2003

Postby hag » Sat Apr 24, 2010 8:49 pm

If I understand your question you want to send email via outlook. This code sends me an error.log whrn my client gets an error. From his email to mine.


Code: Select all  Expand view
#include "FiveWin.ch"
#include "mail.ch"

 local oMail,aCustomer:={}
   local cSubject:="Error file"
   local cWhich    
   local curDir  := curDir()   
   local curDri  := curDrive() 
   local cMessage:=""
   local aFiles  := {} 
   local cName  
   local cEntity, cName2, cTele,oGet1,oGet2,oDlg3
   local cDemo 


   DEFINE FONT oFont7 NAME "Ms Sans Serif" SIZE 0,-12
   DEFINE DIALOG ODLG3 RESOURCE "errmess" font ofont7

   REDEFINE get oGet1 var cName2 ID 4003 OF oDlg3
   REDEFINE get oGet2 var cTele  ID 4004 OF oDlg3 picture "999-999-9999"
   REDEFINE BUTTON ID 4002 OF oDlg3 ACTION (odlg3:end())   

   ACTIVATE DIALOG oDlg3 centered

   cWhich := curdri+":\"+curDir+"\"+"error.txt"        

   aFiles:={"
cWhich","Error.txt"}

   aadd(aCustomer,"
support@upyourcashflow.com")

   DEFINE MAIL oMail  ;
   SUBJECT cSubject   ;
     TEXT  allTrim(cName)+CRLF+DTOC(DATE())+"
"+TIME()+CRLF+"Version xt2009-10, date: "+cVersion+" "+cDemo+CRLF+;
                 alltrim(cName2)+"
"+cTele ;
     FILES curdri+"
:\"+curDir+"\"+"error.txt","Error.txt"   ;
     TO "
support@upyourcashflow.com"

   ACTIVATE MAIL oMail

  msgInfo("
Notice sent  ")
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: Microsoft Outlook 2003

Postby Enrico Maria Giordano » Sun Apr 25, 2010 9:50 am

This is a working sample:

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oMail

    LOCAL cRec := "Enrico Maria Giordano"
    LOCAL cEma := "e.m.giordano@emagsoftware.it"
    LOCAL cSub := "Test"
    LOCAL cAtt := CURDRIVE() + "\:" + CURDIR() + "\TEST.PRG"

    DEFINE MAIL oMail;
           SUBJECT cSub;
           TEXT "This is a test";
           FROM USER;
           FILES cAtt, ""

    oMail:aRecipients = { { cRec, cEma } }

    ACTIVATE MAIL oMail

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Microsoft Outlook 2003

Postby MdaSolution » Sun Apr 25, 2010 3:46 pm

Thanks Emg
FWH .. BC582.. xharbour
User avatar
MdaSolution
 
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Marc Venken and 111 guests