Sorry Karl, I tried but the red errors are flying around here.
Where has the
+”\n”
to be placed in the script?
For example we want this:
(if it is possible)
new device on network
MAC-Number ;
B8:C7:5D:C6:B0:98 ;
IP-Number ;
192.168.188.141;
Time-Of-Last-Change ;
2018-07-05 08:27:19 ;
Status;
up;
N.of-Ch. ;
32705 ;
Nick-Name ;
new-10-B8:C7:5D:C6:B 0:98 ;
Hardware-Vendor ;
Apple ;
DeviceInfo ;
;
# Putting a variable's data into the subject and body
ipDev = indigo.variables["ipDevsNewDeviceNo"]
ipDevVarNumber = ipDev.value.split(";")[0]
devName = ipDev.value.split(";")[1]
theSubject = "new device on network " + devName
theBody = "new device on network\n"
theBody += indigo.variables["ipDevice00"].value +"\n" # this gives the headline
theBody += indigo.variables[ipDevVarNumber].value # this writes the contents of the new variable below the header line
indigo.server.log(theBody)# also send it to the indigo log file
indigo.server.sendEmailTo("xxxx@xxx.com", subject=theSubject, body=theBody)