Read the statement by Michael Teeuw here.
Email
-
Hello,
you can adjust the size of the email?
at too long email that goes module over the entire screen -
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 -
So far it’s working like a charm! Thanks for creating this module.
-
@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.
-
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; }});
-
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** -
perfekt it works !!
but I’d love that is hidden, the email address and the mail before each a symbol appears is that possible? -
hello, thank you to help me by the email module !!
but I have a question
you can insert a symbol in front of the email?so i have think tis symbol

-
-
Errors
Email notifier error: { Error: read ECONNRESET
at exports._errnoException (util.js:1026:11)
at TCP.onread (net.js:564:26)
code: ‘ECONNRESET’,
errno: ‘ECONNRESET’,
syscall: ‘read’,
source: ‘socket’ }
Email notifier error: { Error: read ECONNRESET
at exports._errnoException (util.js:1026:11)
at TCP.onread (net.js:564:26)
code: ‘ECONNRESET’,
errno: ‘ECONNRESET’,
syscall: ‘read’,
source: ‘socket’ }
Email notifier error: { Error: read ECONNRESET
at exports._errnoException (util.js:1026:11)
at TCP.onread (net.js:564:26)
code: ‘ECONNRESET’,
errno: ‘ECONNRESET’,
syscall: ‘read’,
source: ‘socket’ }
Email notifier error: { Error: read ECONNRESET
at exports._errnoException (util.js:1026:11)
at TCP.onread (net.js:564:26)
code: ‘ECONNRESET’,
errno: ‘ECONNRESET’,
syscall: ‘read’,
source: ‘socket’ }
Email notifier error: { Error: read ECONNRESET
at exports._errnoException (util.js:1026:11)
at TCP.onread (net.js:564:26)
code: ‘ECONNRESET’,
errno: ‘ECONNRESET’,
syscall: ‘read’,
source: ‘socket’ } -
Hello ronny3050, the module is great, but after a while the module stands still. On my Mobilphone there are messages about new emails but your email Module does nothing. After a restart from the raspberry pi, everything is ok again, but after a few hours the same… Could you help me ?
Thanks
Yours Peter van Evert -
@Peter_van_Evert hes offline since two months, you probably have more success with open an issue on github
-
@strawberry-3.141 @Peter_van_Evert I apologize for not being able to get back to you sooner - been busy with grad school. :( I replied on the issue on github. Thanks! :)
-
can anyone think of a reason the email is not updating to show new emails? i’m very new to this stuff, the temperature module is updating the temperature so its still connected.
thanks -
@zman3 I got the same problem and only one solution, till now. Press CTRL(STRG) and R to restart the magic mirror client. After that the emails are ok, till 2-3 hours… :)
-
@Peter_van_Evert This is really strange. I have not faced this myself.
I think it is because your email client stops responding after 2-3 hours due to security reasons, perhaps :/ -
@wjdw87 This usually happens due to two reasons:
- Connection to your mail client is not possible - try the two-factor authentication mentioned before for using Gmail, or your credentials are wrong.
- Try restarting mirror.
-
Is it possible to sroll the subject instead of putting a limit to the number of characters ?
-
Hi! is it possible to use it in emails requesting 2nd factor?
-
Hi guys can any 1 help me? Email module shows all the time no new emails, and the console looks like this:

Edit: Solved. Just added “subjectlength: 50” at the end of script and works fine :)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login
