• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Email

Scheduled Pinned Locked Moved Productivity
92 Posts 36 Posters 112.5k Views 39 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    strawberry 3.141 Project Sponsor Module Developer
    last edited by Aug 23, 2016, 10:47 AM

    multiple adresses are currently not possible

    Please create a github issue if you need help, so I can keep track

    1 Reply Last reply Reply Quote 1
    • N Offline
      Neokamikaze
      last edited by Aug 25, 2016, 12:24 PM

      Hi @ronny3050,

      I have a problem, same problem that @pietrodona. My emails are double on my mirror same after reboot. After a few day, my emails are double on my mirror. And after delete my emails on Gmail these emails aren’t deleted on my mirror.

      Thanks

      1 Reply Last reply Reply Quote 0
      • C Offline
        cowboysdude Module Developer @ronny3050
        last edited by Sep 30, 2016, 8:51 PM

        @ronny3050 said in Email:

        @amanzimdwini Also, if you’re using Gmail, you need to ‘set lower security for apps’ https://www.google.com/settings/security/lesssecureapps.

        @ronny3050 I did that and still no emails ;( Everything is set up correctly … login/password …

        Suggestions?

        1 Reply Last reply Reply Quote 0
        • S Offline
          samydp
          last edited by Oct 1, 2016, 11:05 AM

          Hello,
          you can adjust the size of the email?
          at too long email that goes module over the entire screen

          H 1 Reply Last reply Oct 1, 2016, 2:39 PM Reply Quote 0
          • H Offline
            Hacksaw @samydp
            last edited by Hacksaw Oct 1, 2016, 2:40 PM Oct 1, 2016, 2:39 PM

            @samydp

            email.js
            search line 59:
            var subject = mailObj.subject.replace(/[['“]]+/g,”");
            among them include:
            var subject = subject.substring(0,30); //This limit of 30 characters

            1 Reply Last reply Reply Quote 0
            • R Offline
              robertdempsey
              last edited by Oct 1, 2016, 11:27 PM

              So far it’s working like a charm! Thanks for creating this module.

              1 Reply Last reply Reply Quote 1
              • R Offline
                robertdempsey @pietrodona
                last edited by Oct 1, 2016, 11:40 PM

                @pietrodona be sure to install the dependencies per the README. I skipped that part and MM stopped at a white screen. Once the deps were installed everything worked well.

                1 Reply Last reply Reply Quote 2
                • S Offline
                  samydp
                  last edited by samydp Oct 2, 2016, 10:20 AM Oct 2, 2016, 10:19 AM

                  thx, but dont have the line :/

                  this is in the email.js file :

                  defaults : {
                      user: 'a@b.com',
                      password: 'xxx',
                      host: 'jjj.kkk.com',
                      port: 993,
                      tls: true,
                      authTimeout: 10000,
                      numberOfEmails: 5,
                      fade: true
                  },
                  payload: [],
                  
                  start : function(){
                      console.log("Email module started!");
                      this.sendSocketNotification('LISTEN_EMAIL',{config: this.config, payload: this.payload, loaded: this.loaded});
                      this.loaded = false;
                  },
                  
                  socketNotificationReceived: function(notification, payload){
                      if (notification === 'EMAIL_RESPONSE'){
                          if(payload){
                              this.loaded = true;
                              var that = this;
                              console.log("NEW PAYLOAD: ", payload);
                              payload.forEach(function(m){
                                  if(that.payload.indexOf(m.id) == -1)
                                      that.payload.push(m);
                              });
                  
                              this.payload.sort(function(a,b) {return b.id - a.id; });
                  
                              this.sendSocketNotification('LISTEN_EMAIL',{config: this.config, payload: this.payload, loaded: this.loaded});
                              this.updateDom(2000);
                          }
                      }
                  },
                  
                  // Define required scripts.
                  getStyles: function() {
                      return ["email.css", "font-awesome.css"];
                  },
                  
                  getDom: function(){
                      var wrapper = document.createElement("table");
                      wrapper.className = "small";
                      var that =this;
                      if(this.payload.length > 0)
                      {
                          var count = 0;
                          this.payload.slice(0,this.config.numberOfEmails).forEach(function (mailObj) {
                  
                              var name = mailObj.sender[0].name.replace(/['"]+/g,"");
                              var subject = mailObj.subject.replace(/[\['"\]]+/g,"");
                  
                              var emailWrapper = document.createElement("tr");
                              emailWrapper.className = "normal";
                  
                              var senderWrapper = document.createElement("tr");
                              senderWrapper.className = "normal";
                  
                              var nameWrapper = document.createElement("td");
                              nameWrapper.className = "bright";
                              nameWrapper.innerHTML = name;
                              senderWrapper.appendChild(nameWrapper);
                              var addressWrapper = document.createElement("td");
                              addressWrapper.className = "address xsmall thin dimmed";
                              addressWrapper.innerHTML = mailObj.sender[0].address;
                              senderWrapper.appendChild(addressWrapper);
                              emailWrapper.appendChild(senderWrapper);
                  
                              var subjectWrapper = document.createElement("tr");
                              subjectWrapper.className = "light";
                              subjectWrapper.innerHTML = subject;
                              emailWrapper.appendChild(subjectWrapper);
                  
                              wrapper.appendChild(emailWrapper);
                  
                              // Create fade effect.
                              if (that.config.fade) {
                                  var startingPoint = that.payload.slice(0,that.config.numberOfEmails).length * 0.25;
                                  var steps = that.payload.slice(0,that.config.numberOfEmails).length - startingPoint;
                                  if (count >= startingPoint) {
                                      var currentStep = count - startingPoint;
                                      emailWrapper.style.opacity = 1 - (1 / steps * currentStep);
                                  }
                              }
                              count++;
                          });
                      }
                      else{
                          wrapper.innerHTML = (this.loaded) ? "No new mails" : this.translate("LOADING");
                          wrapper.className = "small dimmed";
                          return wrapper;
                      }
                  
                      return wrapper;
                  }
                  

                  });

                  1 Reply Last reply Reply Quote 0
                  • H Offline
                    Hacksaw
                    last edited by Hacksaw Oct 2, 2016, 1:16 PM Oct 2, 2016, 1:12 PM

                            var name = mailObj.sender[0].name.replace(/['"]+/g,"");
                            var subject = mailObj.subject.replace(/[\['"\]]+/g,"");    <----- **Here this line**
                            var subject = subject.substring(0,30);  <----- **New Line**
                    
                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      samydp
                      last edited by Oct 3, 2016, 8:16 AM

                      perfekt it works !!
                      but I’d love that is hidden, the email address and the mail before each a symbol appears is that possible?

                      1 Reply Last reply Reply Quote 1
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 6
                      • 9
                      • 10
                      • 4 / 10
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy