Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Fehler beim Versenden von 2 attachments per mail

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Fehler beim Versenden von 2 attachments per mail

    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      d1nd141 last edited by

      Hallo,

      versuche gerade mit Blocky bei einem bestimmten Trigger von meinen Webcam's ein Image zu erstellen, und diese dann per mail zu verschicken.

      Hab's so eingestellt:

      https://github.com/ioBroker/ioBroker.ja … send-email

      Ein Bild versenden geht ohne Problem! bei 2 attachments jedoch erhalte ich im Log Fehler!

      Im Blocky hab ich 2 Textfelder mit SendTo-Email verbunden, jeweils bei Filename:

      2018-03-02 14:52:21.490	error	at Object.createScript (vm.js:80:10)
      2018-03-02 14:52:21.490	error	SyntaxError: Unexpected token {
      2018-03-02 14:52:21.489	error	^
      2018-03-02 14:52:21.489	error	{path: '/tmp/garage2.jpg', cid: "file2"}
      2018-03-02 14:52:21.489	error	at script.js.common.Garagentor:25
      2018-03-02 14:52:21.489	error	script.js.common.Garagentor compile failed:
      
            sendTo("email", "send", {
               html: '
      
      Embedded image 1: ![](\'cid:file1\'/)
      
      Embedded image 2: ![](\'cid:file2\'/)
      
      ',
               to: 'xxxx',
               subject: 'Garage',
               from: 'xxxx',
               attachments:[
                  {path: '/tmp/garage1.jpg', cid: "file1"}
                  {path: '/tmp/garage2.jpg', cid: "file2"}
                ]
            });
      

      Einer eine Idee?

      Besten Dank im Voraus!

      MOD-Edit by eric2905; Logs, usw. bitte immer in CODE-und ggf. SPOILER-Tags setzen
      6148_chrome_2018-03-02_15-03-27.jpg

      1 Reply Last reply Reply Quote 0
      • D
        d1nd141 last edited by

        Ok, sieht so aus als sei dies ein Fehler von Blocky:

        Kopiere ich den ganzen Blocky Source script und füge alles als neues Javascript ein, ändere dann:

        attachwments:[
                    {path: '/tmp/garage1.jpg', cid: "file1"}
                    {path: '/tmp/garage2.jpg', cid: "file2"}
                  ]
        

        in

        attachments:[
                    {path: '/tmp/garage1.jpg', cid: "file1"}[color],[/color]
                    {path: '/tmp/garage2.jpg', cid: "file2"}
                  ]
        

        gibt's keine Fehler mehr.

        Speichere ich dann ab, will iobroker das ganze als Blocky umwandeln. Bestätige ich dies, wird das Komma wieder entfernt, und ein Fehler angezeigt.

        MOD-Edit by eric2905; siehe oben

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        Support us

        ioBroker
        Community Adapters
        Donate

        822
        Online

        31.7k
        Users

        79.8k
        Topics

        1.3m
        Posts

        1
        2
        232
        Loading More Posts
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes
        Reply
        • Reply as topic
        Log in to reply
        Community
        Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
        The ioBroker Community 2014-2023
        logo