Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dialing out
Message
From
24/11/2001 08:03:15
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
23/11/2001 15:07:24
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00578109
Message ID:
00585346
Views:
36
Larry,
http://shop.microsoft.com/Referral/productInfo.asp?siteID=10950
Full version is listed as 549$ and upgrade 279$
I bet it would save at least 1hr of development time daily paying upgrade in 10 days (assuming 28$ hourly rate) - don't tell me you already work 1hr a day :) I'm not from MS promotional but VFP7 really deserves to be promoted (thanks to Fox team once again). Enhancements in IDE, editing, language etc are much more than what it was from VFP5 to 6. Ppl saying that it was just another 6.x is totally nonsense IMHO.

SMTP server name is the sender server there AFAIK. If the sender is AOL they should have a server name or at least a TCP/IP address. However the server might not be allowing relaying.
I also use wwIPSstuff and it's good. However when it's multiple attachments I use MAPI controls (MSMSess and MSMmess activex). With MAPI controls I don't bother about server name etc. and use defaults. What I need is recipient address(es), subject, body, attachmenlist. Here is class code I use (actually a modified version of sample in solution.app) :
**************************************************
*-- Class:        sendmail2 (c:\proglib\cetin.vcx)
*-- ParentClass:  container
*-- BaseClass:    container
*-- Time Stamp:   05/05/00 10:15:02 PM
*
Define CLASS sendmail2 AS container
  Width = 74
  Height = 28
  BorderWidth = 0
  *-- Message body
  msgnotetext = ""
  *-- Message subject
  msgsubject = ""
  *-- Recipient's address
  recipaddress = ""
  Name = "sendmail2"
  *-- Shows address book when set to .t.
  lshowaddressbook = .F.
  *-- Logged on to session ?
  logsession = .F.
  *-- Array holding list of attachments
  Dimension aattachlist[1]

  Add OBJECT olemmess AS olecontrol WITH ;
    Top = 1, ;
    Left = 1, ;
    Height = 100, ;
    Width = 100, ;
    Name = "OLeMMess", ;
    OleClass = 'MSMAPI.MapiMessages'

  Add OBJECT olemsess AS olecontrol WITH ;
    Top = 1, ;
    Left = 1, ;
    Height = 100, ;
    Width = 100, ;
    Name = "OleMSess", ;
    OleClass = 'MSMAPI.MapiSession'


  Add OBJECT command1 AS commandbutton WITH ;
    Top = 1, ;
    Left = 1, ;
    Height = 27, ;
    Width = 72, ;
    Caption = "\&ltSend Mail", ;
    Name = "Command1"


  *-- Logon to mail session
  Procedure signon
    #Define ERR_NOMAPI_LOC	"It does not appear that you have MAPI installed. Mail could not be run."
    #Define ERR_NOLOGON_LOC	"Couldn't log on. Mail could not be run."

    This.logsession = .T.

    If !FILE(GETENV("WINDIR")+"\SYSTEM32\MAPI32.DLL");
        AND !FILE(GETENV("WINDIR")+"\SYSTEM\MAPI32.DLL")
      Messagebox(ERR_NOMAPI_LOC)
      Return .F.
    Endif

    This.olemsess.signon
    If this.olemsess.sessionId &lt= 0
      Messagebox(ERR_NOLOGON_LOC)
      Return .F.
    Endif
  Endproc

  Procedure Init
    This.logsession = .F.
    Declare integer GetForegroundWindow in Win32API
    Declare short SetForegroundWindow in Win32API integer hWnd
  Endproc

  Procedure Error
    Lparameters nError, cMethod, nLine
    =messageb(message(),48)
    This.logsession = .F.
  Endproc

  Procedure command1.Error
    Lparameters nError, cMethod, nLine
    If this.Tag = "Reported"
      This.Tag = ""
      Return
    Endif
    lcMessage = "Mapi mailing system returned an error."+;
      iif(at(":",message()) > 0,;
      chr(13)+"Error message text : "+;
      chr(13)+substr(message(),at(":",message())+1),"")
    =messageb(lcMessage,48,"MAPIMessage")
    This.Tag = "Reported"
    If this.parent.logsession
      This.parent.olemsess.signoff
    Endif
    This.parent.logsession = .F.
  Endproc

  Procedure command1.Click
    Local lcCurPath, ix, lnHwnd
    lcCurPath = sys(5)+curdir() && MAPI control might change it to ie: ..\Outlook Express
    If !this.parent.signon()	&& Use the custom method
      Set default to (lcCurPath)
      Return
    Endif
    lnHwnd = GetForegroundWindow() && Save window handle
    With this.parent.olemmess
      If this.parent.logsession	&& Check if the user was able to login
        .sessionId= This.Parent.olemsess.sessionId

        * Start a new mail message and build the text
        .compose
        If !empty(This.Parent.recipaddress)
          .recipaddress = This.Parent.recipaddress
        Endif
        If .Parent.lshowaddressbook
          * and empty(This.Parent.RecipAddress)
          .Object.Show(.F.)
        Endif
        .msgnotetext=this.parent.msgnotetext
        .msgsubject= this.parent.msgsubject
        If This.parent.aattachlist[1] = "C"
          For ix = 1 to alen(This.parent.aattachlist,1)
            If file(This.parent.aattachlist[ix])
              If .AttachmentCount > 0
                .AttachmentIndex = .AttachmentIndex + 1
              Endif
              .AttachmentPathName = This.parent.aattachlist[ix]
            Endif
          Endfor
        Endif
        .send(1)
        If this.parent.logsession
          This.parent.olemsess.signoff
        Endif	&& Session Handle test
      Endif 	&& Login Test
    Endwith
    Set default to (lcCurPath)

    SetForegroundWindow(lnHwnd)
  Endproc
Enddefine
*
*-- EndDefine: sendmail2
**************************************************
If available before click other objects on form fill properties of this container (msgnotetext,msgsubject,recipaddress and possibly array with a list of full path&filenames of attachments). Whether filled or not Send(1) causes the 'new mail' window displayed where user could fill there. If properties are ready, you could fill in background and send(0) (0 and 1 serve as .f., .t. and might be used instead).

I really look forward to meet many of foxes one day :) And actually met one from Orlando on their visit to Turkey - now he is my partner :) I was very pleased they changed their trip route just to visit us too, short after a very big earthquake in Turkey. Probably you're accustomed seeing foxheads face to face there but here it's really exciting :) There was an opportunity to be in Redmond 3 days later but unfortunately my email requesting the invitation in hardcopy wasn't replied at all :( I think the person at MS found it funny I needed a written invitation to get visa or realized I was from an Islamic country after the invitation.
Cetin

>Thanks Cetin -
>
>I will copy through and step through it.
>
>Need to convince the powers at be, to pay for the upgrade to VFP7. I think it's around $1200 USD.
>
>Got a client, who needs to send out email using aol . Our email object requires an smtp server name with supporting email address (originally got from WestWind years ago see below). How would we get around aol as I don't believe they use server name.
>
>I would love to replace this with something that has a whole lot more functionality, like retrieving, send multiple attachments, etc., ideally work with existing mail servers like Outlook or something.
>
>Problem, I am so unschooled in this area and need to be able to back my statements up before getting a go ahead. ANy ideas?
>
>I realy look forward to meeting you one day, to personally say thanks for the help in the past.
>
>Larry
>
Ç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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform