Normal Topic @sendmail - local net client vs internet client (Read 845 times)
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
@sendmail - local net client vs internet client
Aug 29th, 2011 at 3:01pm
Print Post Print Post  
When I'm physically 'in' my office, when I run the following code, it works perfectly, emailing me the exported file (saved to the 'sesame start in' directory).

But when I'm accessing Sesame over the Internet from a remote (offsite) location, sendmail doesn't send the newly created file on the server. 

How can I tell sendmail to 'get/send' the file vWeb that the programming just created on the server?


        vWeb = vClientID + ".csv"   
writeln(vWeb)

        
          RunExportSpec(vWeb,"","",0,0,0,0,0,0,0,0)
          Loiter(3000)

        vEmail = @sendmail("smtp2go.com","WebExport","MyFromAddress.com","MyToAddress.com","","",
"Here is a WebExport of " + vWeb,"","",vWeb)

       Loiter(1000)
         writeln(vEmail)
  

Larry
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: @sendmail - local net client vs internet clien
Reply #1 - Aug 30th, 2011 at 2:08pm
Print Post Print Post  
Hello lksseven,

@SendMail() is looking for the file in the local working directory where the export creates the file in the Server's working directory.

What you will want to do is write the export file locally using the SBasic File IO commands to write out the data and either the FormFieldValue commands, a Mass Update, or the XResultSet commands to grab all the data that needs to be written out.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: @sendmail - local net client vs internet clien
Reply #2 - Aug 30th, 2011 at 3:45pm
Print Post Print Post  
Hi Ray,

Questions:
1) @Sendmail - My testing (this morning) shows that if I define vWeb as "c:\sesame2\sdata\export\" + vClientID + ".csv" , then RunExportSpec(vWeb), then the "C:" is the local client Cdrive, and not the Sesame Server Cdrive, correct? 

If that's the case, then that should solve my problem, as any time I run this command, it'll export the file (and be thus accessible to SendMail) to my local client wrkstn, even if I'm remotely connected through the Internet, (as long as I have a premade directory path as indicated in the variable) - correct? 

BTW, just for my own edification
2) is there a way to grab, from a local SesameClient, a file that resides on the Sesame Server working directory?

« Last Edit: Aug 30th, 2011 at 5:52pm by lksseven »  

Larry
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: @sendmail - local net client vs internet clien
Reply #3 - Aug 30th, 2011 at 6:33pm
Print Post Print Post  
lksseven wrote on Aug 30th, 2011 at 3:45pm:
Hi Ray,

Questions:
1) @Sendmail - My testing (this morning) shows that if I define vWeb as "c:\sesame2\sdata\export\" + vClientID + ".csv" , then RunExportSpec(vWeb), then the "C:" is the local client Cdrive, and not the Sesame Server Cdrive, correct?  


The RunExportSpec() call will create the export file on the Server's C drive in the c:\sesame2\sdata\export\ directory.

Quote:
BTW, just for my own edification
2) is there a way to grab, from a local SesameClient, a file that resides on the Sesame Server working directory?


In Version 3 there will be a command to transfer from the Sesame Server to the client. In Sesame 2 you can use the FTP commands if the Server computer is set up as an FTP server.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged