NEWS
Email mit mehr als 3 Anhängen senden
-
Hallo,
ich versuche gerade Mails mit mehr als 3 anhängen zu versenden.
Leider erlaubt der sentTo Block vom Emailadapter nur 2 Anhänge.
Habe jetzt versucht das in zig Versionen nachzubauen, zB:

klappt aber alles nicht.Der Original Block generiert dieses JS:
sendTo('email.0', 'send', { html: ('' + 'Laaalaaa'), to: 'x@x.de', subject: 'Krankheit und Strom', attachments:[ { path: '/opt/iobroker/node_modules/iobroker.javascript/html/krank.pdf', cid: 'file1' }, { path: '/opt/iobroker/node_modules/iobroker.javascript/html/strom.pdf', cid: 'file2' }, ], -
Hallo,
ich versuche gerade Mails mit mehr als 3 anhängen zu versenden.
Leider erlaubt der sentTo Block vom Emailadapter nur 2 Anhänge.
Habe jetzt versucht das in zig Versionen nachzubauen, zB:

klappt aber alles nicht.Der Original Block generiert dieses JS:
sendTo('email.0', 'send', { html: ('' + 'Laaalaaa'), to: 'x@x.de', subject: 'Krankheit und Strom', attachments:[ { path: '/opt/iobroker/node_modules/iobroker.javascript/html/krank.pdf', cid: 'file1' }, { path: '/opt/iobroker/node_modules/iobroker.javascript/html/strom.pdf', cid: 'file2' }, ], -
Es wäre vielleicht möglich, die vorgesehenen Anhänge in einer Zip-Datei zu verpacken.
-
Hallo,
ich versuche gerade Mails mit mehr als 3 anhängen zu versenden.
Leider erlaubt der sentTo Block vom Emailadapter nur 2 Anhänge.
Habe jetzt versucht das in zig Versionen nachzubauen, zB:

klappt aber alles nicht.Der Original Block generiert dieses JS:
sendTo('email.0', 'send', { html: ('' + 'Laaalaaa'), to: 'x@x.de', subject: 'Krankheit und Strom', attachments:[ { path: '/opt/iobroker/node_modules/iobroker.javascript/html/krank.pdf', cid: 'file1' }, { path: '/opt/iobroker/node_modules/iobroker.javascript/html/strom.pdf', cid: 'file2' }, ],@David-G. In Blockly

<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="W+Y]Aak)G!OcUX==2le:">arr</variable> <variable id="8vq|4pXP|q|*:f.sh[CE">obj1</variable> <variable id="}^Nh#6:/AlN/,1Yz^!%w">obj2</variable> <variable id="`096Z2F^K4n@8ugJiA/+">obj3</variable> </variables> <block type="variables_set" id="W%dUSL6lGvO+{EnY/35F" x="280" y="-150"> <field name="VAR" id="W+Y]Aak)G!OcUX==2le:">arr</field> <value name="VALUE"> <block type="lists_create_with" id="oV{;4Laum3jGD%v:f@,u"> <mutation items="0"></mutation> </block> </value> <next> <block type="variables_set" id="]Y[$~Bl!*#a:EvgQQ)(~"> <field name="VAR" id="8vq|4pXP|q|*:f.sh[CE">obj1</field> <value name="VALUE"> <block type="object_new" id=")ROzUzDe.j,a(JkBIo+{"></block> </value> <next> <block type="variables_set" id="0D)P8lNoSj01h-LaeZjJ"> <field name="VAR" id="}^Nh#6:/AlN/,1Yz^!%w">obj2</field> <value name="VALUE"> <block type="object_new" id="tm~K~^3lWUbkFJ{=y9m3"></block> </value> <next> <block type="variables_set" id="qc`/oHsmC^5Y/$E*U.sh"> <field name="VAR" id="`096Z2F^K4n@8ugJiA/+">obj3</field> <value name="VALUE"> <block type="object_new" id="yo,uBN[7dTB(KK_ti-~W"></block> </value> <next> <block type="object_set_attr" id="D3k*/NVzl/X5zx.[F.0s"> <field name="ATTR">path</field> <value name="OBJECT"> <block type="variables_get" id="k%XM/FwqIC=!xBV|]P)l"> <field name="VAR" id="8vq|4pXP|q|*:f.sh[CE">obj1</field> </block> </value> <value name="VALUE"> <shadow type="text" id="])@)~$[QF+$#OBnY7MHk"> <field name="TEXT">https://192.168.178.150:8082/0_userdata.0/PDF/demo.txt</field> </shadow> </value> <next> <block type="lists_setIndex" id="N]a-/PK8KR$.8RS7Eoi_"> <mutation at="false"></mutation> <field name="MODE">INSERT</field> <field name="WHERE">FIRST</field> <value name="LIST"> <block type="variables_get" id="0aD$W(EVHnx0;%_reI(y"> <field name="VAR" id="W+Y]Aak)G!OcUX==2le:">arr</field> </block> </value> <value name="TO"> <block type="variables_get" id="1VWkh3BAfQcDUDvS+WqC"> <field name="VAR" id="8vq|4pXP|q|*:f.sh[CE">obj1</field> </block> </value> <next> <block type="object_set_attr" id="0%VZl(,6+}69:lMutKA^"> <field name="ATTR">path</field> <value name="OBJECT"> <block type="variables_get" id="X:h,sPU{rW2Vxb%O;Zj)"> <field name="VAR" id="}^Nh#6:/AlN/,1Yz^!%w">obj2</field> </block> </value> <value name="VALUE"> <shadow type="text" id="Z])}{*r@YZ:zl?ECIt%s"> <field name="TEXT">https://192.168.178.150:8082/0_userdata.0/PDF/demo2.txt</field> </shadow> </value> <next> <block type="lists_setIndex" id="#4338x;BcgIkLS6Bh4f{"> <mutation at="false"></mutation> <field name="MODE">INSERT</field> <field name="WHERE">FIRST</field> <value name="LIST"> <block type="variables_get" id="(A-o8.AEKq6(MP3KfPNp"> <field name="VAR" id="W+Y]Aak)G!OcUX==2le:">arr</field> </block> </value> <value name="TO"> <block type="variables_get" id="l|:cj#1U,By8E/tN:}Dk"> <field name="VAR" id="}^Nh#6:/AlN/,1Yz^!%w">obj2</field> </block> </value> <next> <block type="object_set_attr" id="EX!+np(Fd(9n$K`oM$5^"> <field name="ATTR">path</field> <value name="OBJECT"> <block type="variables_get" id="R#ObF.KhP7._bNX]3237"> <field name="VAR" id="`096Z2F^K4n@8ugJiA/+">obj3</field> </block> </value> <value name="VALUE"> <shadow type="text" id="Gj^:)KLeVcVUWzIBG6y_"> <field name="TEXT">https://192.168.178.150:8082/0_userdata.0/PDF/demo3.txt</field> </shadow> </value> <next> <block type="lists_setIndex" id="R09qXSKAO^lP!B5Kjp9a"> <mutation at="false"></mutation> <field name="MODE">INSERT</field> <field name="WHERE">FIRST</field> <value name="LIST"> <block type="variables_get" id="D:.i23$+kLJGPdj7cB8c"> <field name="VAR" id="W+Y]Aak)G!OcUX==2le:">arr</field> </block> </value> <value name="TO"> <block type="variables_get" id="h$nd7-g-yD7}S|#x:o6]"> <field name="VAR" id="`096Z2F^K4n@8ugJiA/+">obj3</field> </block> </value> <next> <block type="debug" id="4~L*wcm,k3Ta~.](#0)C"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="sUciXr,5a0U?3(P]N:!="> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="Y+S]WAf@R%{XR1sUjloE"> <field name="VAR" id="W+Y]Aak)G!OcUX==2le:">arr</field> </block> </value> <next> <block type="sendto_custom" id="@yn|F]fcLRv@2wW13Sc%"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="html,to,subject,attachments"></mutation> <field name="INSTANCE">email.0</field> <field name="COMMAND">send</field> <field name="LOG">info</field> <field name="WITH_STATEMENT">TRUE</field> <value name="ARG0"> <shadow type="text" id="q/3vpg2%$i*74sNl|zyM"> <field name="TEXT">Hi</field> </shadow> </value> <value name="ARG1"> <shadow type="text" id="kU]=1/mcp%;-Vp1d=tG8"> <field name="TEXT"></field> </shadow> </value> <value name="ARG2"> <shadow type="text" id="?^CFUKjM[-qiL)^KimR5"> <field name="TEXT">Test</field> </shadow> </value> <value name="ARG3"> <shadow type="text" id="5;=4cchpC91,}rKcBo2;"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="OSx)-d:IPc$Y2*t{4(rt"> <field name="VAR" id="W+Y]Aak)G!OcUX==2le:">arr</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </xml> -
@David-G. In Blockly

<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="W+Y]Aak)G!OcUX==2le:">arr</variable> <variable id="8vq|4pXP|q|*:f.sh[CE">obj1</variable> <variable id="}^Nh#6:/AlN/,1Yz^!%w">obj2</variable> <variable id="`096Z2F^K4n@8ugJiA/+">obj3</variable> </variables> <block type="variables_set" id="W%dUSL6lGvO+{EnY/35F" x="280" y="-150"> <field name="VAR" id="W+Y]Aak)G!OcUX==2le:">arr</field> <value name="VALUE"> <block type="lists_create_with" id="oV{;4Laum3jGD%v:f@,u"> <mutation items="0"></mutation> </block> </value> <next> <block type="variables_set" id="]Y[$~Bl!*#a:EvgQQ)(~"> <field name="VAR" id="8vq|4pXP|q|*:f.sh[CE">obj1</field> <value name="VALUE"> <block type="object_new" id=")ROzUzDe.j,a(JkBIo+{"></block> </value> <next> <block type="variables_set" id="0D)P8lNoSj01h-LaeZjJ"> <field name="VAR" id="}^Nh#6:/AlN/,1Yz^!%w">obj2</field> <value name="VALUE"> <block type="object_new" id="tm~K~^3lWUbkFJ{=y9m3"></block> </value> <next> <block type="variables_set" id="qc`/oHsmC^5Y/$E*U.sh"> <field name="VAR" id="`096Z2F^K4n@8ugJiA/+">obj3</field> <value name="VALUE"> <block type="object_new" id="yo,uBN[7dTB(KK_ti-~W"></block> </value> <next> <block type="object_set_attr" id="D3k*/NVzl/X5zx.[F.0s"> <field name="ATTR">path</field> <value name="OBJECT"> <block type="variables_get" id="k%XM/FwqIC=!xBV|]P)l"> <field name="VAR" id="8vq|4pXP|q|*:f.sh[CE">obj1</field> </block> </value> <value name="VALUE"> <shadow type="text" id="])@)~$[QF+$#OBnY7MHk"> <field name="TEXT">https://192.168.178.150:8082/0_userdata.0/PDF/demo.txt</field> </shadow> </value> <next> <block type="lists_setIndex" id="N]a-/PK8KR$.8RS7Eoi_"> <mutation at="false"></mutation> <field name="MODE">INSERT</field> <field name="WHERE">FIRST</field> <value name="LIST"> <block type="variables_get" id="0aD$W(EVHnx0;%_reI(y"> <field name="VAR" id="W+Y]Aak)G!OcUX==2le:">arr</field> </block> </value> <value name="TO"> <block type="variables_get" id="1VWkh3BAfQcDUDvS+WqC"> <field name="VAR" id="8vq|4pXP|q|*:f.sh[CE">obj1</field> </block> </value> <next> <block type="object_set_attr" id="0%VZl(,6+}69:lMutKA^"> <field name="ATTR">path</field> <value name="OBJECT"> <block type="variables_get" id="X:h,sPU{rW2Vxb%O;Zj)"> <field name="VAR" id="}^Nh#6:/AlN/,1Yz^!%w">obj2</field> </block> </value> <value name="VALUE"> <shadow type="text" id="Z])}{*r@YZ:zl?ECIt%s"> <field name="TEXT">https://192.168.178.150:8082/0_userdata.0/PDF/demo2.txt</field> </shadow> </value> <next> <block type="lists_setIndex" id="#4338x;BcgIkLS6Bh4f{"> <mutation at="false"></mutation> <field name="MODE">INSERT</field> <field name="WHERE">FIRST</field> <value name="LIST"> <block type="variables_get" id="(A-o8.AEKq6(MP3KfPNp"> <field name="VAR" id="W+Y]Aak)G!OcUX==2le:">arr</field> </block> </value> <value name="TO"> <block type="variables_get" id="l|:cj#1U,By8E/tN:}Dk"> <field name="VAR" id="}^Nh#6:/AlN/,1Yz^!%w">obj2</field> </block> </value> <next> <block type="object_set_attr" id="EX!+np(Fd(9n$K`oM$5^"> <field name="ATTR">path</field> <value name="OBJECT"> <block type="variables_get" id="R#ObF.KhP7._bNX]3237"> <field name="VAR" id="`096Z2F^K4n@8ugJiA/+">obj3</field> </block> </value> <value name="VALUE"> <shadow type="text" id="Gj^:)KLeVcVUWzIBG6y_"> <field name="TEXT">https://192.168.178.150:8082/0_userdata.0/PDF/demo3.txt</field> </shadow> </value> <next> <block type="lists_setIndex" id="R09qXSKAO^lP!B5Kjp9a"> <mutation at="false"></mutation> <field name="MODE">INSERT</field> <field name="WHERE">FIRST</field> <value name="LIST"> <block type="variables_get" id="D:.i23$+kLJGPdj7cB8c"> <field name="VAR" id="W+Y]Aak)G!OcUX==2le:">arr</field> </block> </value> <value name="TO"> <block type="variables_get" id="h$nd7-g-yD7}S|#x:o6]"> <field name="VAR" id="`096Z2F^K4n@8ugJiA/+">obj3</field> </block> </value> <next> <block type="debug" id="4~L*wcm,k3Ta~.](#0)C"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="sUciXr,5a0U?3(P]N:!="> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="Y+S]WAf@R%{XR1sUjloE"> <field name="VAR" id="W+Y]Aak)G!OcUX==2le:">arr</field> </block> </value> <next> <block type="sendto_custom" id="@yn|F]fcLRv@2wW13Sc%"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="html,to,subject,attachments"></mutation> <field name="INSTANCE">email.0</field> <field name="COMMAND">send</field> <field name="LOG">info</field> <field name="WITH_STATEMENT">TRUE</field> <value name="ARG0"> <shadow type="text" id="q/3vpg2%$i*74sNl|zyM"> <field name="TEXT">Hi</field> </shadow> </value> <value name="ARG1"> <shadow type="text" id="kU]=1/mcp%;-Vp1d=tG8"> <field name="TEXT"></field> </shadow> </value> <value name="ARG2"> <shadow type="text" id="?^CFUKjM[-qiL)^KimR5"> <field name="TEXT">Test</field> </shadow> </value> <value name="ARG3"> <shadow type="text" id="5;=4cchpC91,}rKcBo2;"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="OSx)-d:IPc$Y2*t{4(rt"> <field name="VAR" id="W+Y]Aak)G!OcUX==2le:">arr</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </xml>
Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.
Hast du es satt, bei jedem Besuch durch die gleichen Beiträge zu scrollen? Wenn du dich für ein Konto anmeldest, kommst du immer genau dorthin zurück, wo du zuvor warst, und kannst dich über neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und Beiträge positiv bewerten, um anderen Community-Mitgliedern deine Wertschätzung zu zeigen.
Mit deinem Input könnte dieser Beitrag noch besser werden 💗
Registrieren Anmelden


