Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows 7 email system
Message
From
28/01/2010 05:36:02
 
 
To
28/01/2010 03:39:33
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01446300
Message ID:
01446304
Views:
99
Hi Karen,

Win7 doesn't ship the a by default installed mail app like OE or Windows Mail (Vista).
So...did you already install Windows Live Mail? To me it seems to be just another Win7 GUI for the old Outlook Express.
So it might be possible that the implemented interface might be the same.

>I made the mistake of installing windows 7 which no longer supports outlook email - i am regretting it.
>does anyone have a working replacement code for the default email system for windows7?
>i am curretnly using craig boyd's code for outlook below and would like something that i can just plug in pointing to a different application ...as if life can ever be that easy.
>
>also how can i test somputer for which email system is in operation.
>
>thanks for your help
>
>k
>
>
>
>
>*******************************
>*!* Example of using SendViaOutlook
>*******************************
>#DEFINE olImportanceLow 0
>#DEFINE olImportanceNormal 1
>#DEFINE olImportanceHigh 2
>
>DIMENSION aryAttach(1)
>
>LOCAL lcTo, lcSubject, lcBody, lcCC, lcBCC, llHTMLFormat, llOpenEmail, lcErrReturn
>
>
>lcto = "someone.com"
>lcSubject = "email problems"
>
>*!* Sending the body in HTML format
>llHTMLFormat = .F.
>close alte
> lcBody = "alternative to outlook??"
>
>
>lcCC = " "
>lcBCC = " "
>
>*!* to automatically send email set llOpenEmail to .F.
>llOpenEmail = .T. && Whether email is opened in Outlook or not
>
>SendViaOutlook(@lcErrReturn, lcTo, lcSubject, lcBody, @aryAttach, lcCC, lcBCC, llHTMLFormat, olImportanceHigh, llOpenEmail)
>
>IF EMPTY(lcErrReturn)
>* MESSAGEBOX("'" + lcSubject + "'" + IIF(llOpenEmail, " Prepared ", " sent ") + "successfully.", 64, "Send email via MS Outlook")
>ELSE
> MESSAGEBOX("'" + lcSubject + "' failed to be sent.  Reason:" + CHR(13) + lcErrReturn, 64, "Send email via Outlook")
>ENDIF
>
>*******************************************
>PROCEDURE SendViaOutlook(tcReturn, tcTo, tcSubject, tcBody, taFiles, tcCC, tcBCC, tlHTMLFormat, tnImportance, tlOpenEmail)
> *******************************************
> LOCAL loOutlook, loItem, lnCountAttachments, loMapi
> TRY
>  loOutlook = CREATEOBJECT("outlook.application")
>  loMapi = loOutLook.GetNameSpace("MAPI")
>  loMapi.Logon()
>  loItem = loOutlook.CreateItem(0)
>  WITH loItem
>   .Subject = tcSubject
>   .TO = tcTo
>   IF tlHTMLFormat
>    .HTMLBody = tcBody
>   ELSE
>    .Body = tcBody
>   ENDIF
>   IF TYPE("tcCC") = "C"
>    .CC = tcCC
>   ENDIF
>   IF TYPE("tcBCC") = "C"
>    .BCC = tcBCC
>   ENDIF
>   IF TYPE("tnImportance") != "N"
>    tnImportance = 1 && normal importance
>   ENDIF
>   .Importance = tnImportance
>   
>   *IF TYPE("tafiles",1) = "A"
>    *FOR lnCountAttachments = 1 TO ALEN(taFiles)
>     *.Attachments.ADD(taFiles(lnCountAttachments))
>    *ENDFOR
>   *ENDIF
>   *IF tlOpenEmail
>   
>   .DISPLAY()
>   olMinimized = 1
>    loInspector = .GetInspector()
>    loInspector.WindowState = olMinimized
>   *ELSE
>    *.SEND()
>   *ENDIF
>  ENDWITH
> CATCH TO loError
>  tcReturn = [Error: ] + STR(loError.ERRORNO) + CHR(13) + ;
>   [LineNo: ] + STR(loError.LINENO) + CHR(13) + ;
>   [Message: ] + loError.MESSAGE + CHR(13) + ;
>   [Procedure: ] + loError.PROCEDURE + CHR(13) + ;
>   [Details: ] + loError.DETAILS + CHR(13) + ;
>   [StackLevel: ] + STR(loError.STACKLEVEL) + CHR(13) + ;
>   [LineContents: ] + loError.LINECONTENTS
> FINALLY
>  RELEASE oOutlook, oItem
>  STORE .NULL. TO oOutlook, oItem
> ENDTRY
>ENDPROC
>
>
Best Regards
-Tom

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.

Oh, and BTW: 010101100100011001010000011110000101001001101111011000110110101101110011
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform