Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Emailrelay and attachment


kokihualpa May 4, 2020 12:22 AM

I Want to use the TableFile() to store a backup file and send to my email daily but the compile fail about EmailRelay().

that one is an extract to my program. Can you help me?

Public LastFileName as string * 50,RTD_C2m,RTD_C8m,GradienteRTD_C,SlrkW,Velocidad,Direccion

Public outstat

DataTable(TBE32,True,-1)
DataInterval(0,10,Min,10)
TableFile ("USR:32HorarioBckp",8,1,0,1,Day,outstat,LastFileName)
Average(1,RTD_C2m,FP2,DISABLEVAR1)
Average(1,RTD_C8m,FP2,DISABLEVAR2)
Average(1,GradienteRTD_C,FP2,DISABLEVAR3)
Average(1,SlrkW,IEEE4,False)
WindVector (1,Velocidad,Direccion,FP2,DISABLEVAR4,0,0,1)
EndTable

SlowSequence
Scan (5,Min,0,0)

If IfTime (5,1440,min) Then
asunto3=""
message3=""
asunto3="FILES BACKUP MOVIL MET TRAFICO"
message3 = "Datalogger time is " + Status.Timestamp + CRLF
Emailsuccess3=EmailRelay("jorge.hualpaa@ciplima.org.pe",asunto3,message3,result,LastFileName)

EndIf

nextscan


JDavis May 4, 2020 04:11 PM

What is the compile error you receive?


kokihualpa May 4, 2020 06:10 PM

[Version]C:\Campbellsci\Lib\Compilers\CR1Comp.exe VERSION:CR1000.Std.32.03 DATE:08/03/2018
E32-Movil_Met_Trafico_30-04-20.CR1 -- Compile Failed!

line 522: Expression expects , : Emailsuccess3=EmailRelay("jorge.hualpaa@ciplim....
Error(s) detected in the program. Double-click an error above to navigate to it.


AmnonS Jul 23, 2020 08:01 PM

i have the same problem, any solution? 


artyb Oct 30, 2022 06:38 PM

I'm having the same issue. I can stream from the data tables in loger memory to email, but get this error as soon as I try to email a file on the CRD. I'm trying to email large data files, so using any options which will add additional attachments including data which hadn't been sent previously aren't possible (the files could exceed the emailrelay limit and the email could take longer to send than the modem is on for, so it'd stop working). Unfortunately those are the only options which keep track of which data files have already been emailed though. Sending a file from the CRD would stop there being gaps or overlaps (as long as the file gets sent), and I might also be able to write some code to try to gradually resend files which weren't successfully sent. Any progress?

Log in or register to post/reply in the forum.