Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Email mit mehreren Bildern

    NEWS

    • Neuer Blog: Fotos und Eindrücke von Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    Email mit mehreren Bildern

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

      Hallo,

      nachdem es mir nun gelungen ist, eine email mit einem erzeugten Bild zu senden, würde ich nun gerne mehrere Bilder in eine email packen.

      Kann mir jemand helfen, wie das zu tun ist?

      Wie bekommt man img2 dort rein?

      function sendMailWithAttachment(subject, msg, attachment) {
          sendTo("email", {
              subject:    subject,
              text:       msg,
              html:       "
      
      " +
                          msg +
                          "
      
      " +
                          "![](cid:img1)" +
                          "![](cid:img2)" +
                          "
      
      ",
              attachments: [{path: attachment, cid: "img1"}]
          });
      }
      
      

      Danke und Gruß

      Jens

      1 Reply Last reply Reply Quote 0
      • BuZZy
        BuZZy last edited by

        Ohne den Adapter zu kennen würde ich auf die Schnelle sagen:

        function sendMailWithAttachment(subject, msg, attachment1, attachment2) {
            sendTo("email", {
                subject:    subject,
                text:       msg,
                html:       "
        
        " +
                            msg +
                            "
        
        " +
                            "![](cid:img1)" +
                            "![](cid:img2)" +
                            "
        
        ",
                attachments: [{path: attachment1, cid: "img1"},{path: attachment2, cid: "img2"}]
            });
        }
        
        

        Wobei du jetzt zum Ausführen

        sendMailWithAttachment(subject, msg, attachment1, attachment2);
        

        verwenden musst..

        Also Betreff, Nachricht, Pfad zu Bild1, Pfad zu Bild2 müssen übergeben werden..

        Gruß

        1 Reply Last reply Reply Quote 0
        • Jensen
          Jensen last edited by

          Hallo,

          ja, so geht's.

          Danke und Gruß

          Jens

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

          Support us

          ioBroker
          Community Adapters
          Donate

          794
          Online

          31.7k
          Users

          79.8k
          Topics

          1.3m
          Posts

          2
          3
          379
          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