sendMail - no URL in E-Mail


(Smart Office) #1

Hey there,

I’m trying to send the URL of the Pi Camera via sendMail. Sometimes I receive a message, but no URL, although there is an error "The method sendMail is undefined.

Here you can see the rule:
rule “Send Mail”
when
Item TFkontakt_optisch changed from CLOSED to OPEN
then
sendMail("xxx@gmail.com", “Besucher ist da”, “Test”, “http://192.168.188.131:8050/jpg/image.jpg”)
end

Does anybody have an idea, what’s the problem?

Best regards


(Harry) #2

attachmentUrlList


(Smart Office) #3

Thanks, but now I receive the error "missing EOF at ‘val’. Do I have to name the List or how can i solve this error?


(Harry) #4
import java.util.List

rule “Send Mail”
when
    Item TFkontakt_optisch changed from CLOSED to OPEN
then
    val List<String> attachmentUrlList = newArrayList("http://192.168.188.131:8050/jpg/image.jpg")
    sendMail("xxx@gmail.com", "Besucher ist da", "Test", attachmentUrlList)
end

(Vincent Regaud) #5

@FAPS_2018
Did Harry’s post solve your problem?