Testing of Email Skill

How to install email-skill

How to test email-skill

  • Configure the skill on home.mycroft.ai
  • Say “Check my email”

If you don’t have any new emails, Mycroft should say that you don’t have any new emails.
If you do have new emails, Mycroft should read the sender and the subject of each email.

Feedback

You can post feedback here, on an issue on github, or message @brrn on Mycroft Chat.

this is bad, you are sharing access to your email with mycroft, your credentials should stay on device only

not only is mycroft now storing your email details, they are also being sent over the wire and can be intercepted by man in the middle attacks or some other snooping technique

i suggest you do it like i do in my dictation skill https://github.com/JarbasAl/skill-dictation

allow the user to set email on device config

3 Likes

Thanks @Jarbas_Ai for your feedback and pointing me to your repo. It was very helpful!

I have updated the skill so that it also accepts the username/password from a config file. If you could test it again, that would be great! :grinning:

3 Likes

Hi, maybe I am already to late for this testing thread. Anyway…
I installed the skill successfully, put my email server data into home.mycroft.ai and used the instructions to place my email account parameters into
~/.mycroft/mycroft.conf
I had to create the file and this is the only entry:
{
“email_login”: {
“email”: "paul.panther@myadress.de",
“password”: “password0xyz”
}
}
However, whenever I activate the skill (“Check my email”) Mycroft’s answer is “You have to setup the skill at home.mycroft.ai”.
That is on a Mark-1 running the latest software 18.8.06.
Any suggestions, whats going wrong?
Regards,
Paul

Hi @Paul_Panther, you need to configure the Skill at home.mycroft.ai;

https://home.mycroft.ai/#/skill

@Paul_Panther, if you are putting the credentials in a config file, you also need to put the server info in home.
I know that this is messy (if you store your passwords in the config file) that you need to place your credentials in a config file then go to home and place server info there, so I plan in the next release that you can place all your info in the config file or home (which is much much easier).

Could you place the server info in home and report back?

Thanks

My Android phone, a Moto E4, is my only computing device right now, and I do not have Mycroft installed yet. In order for me to use Mycroft and skills it will all have to be pretty much foolproof.

I appreciate everything that is being done to make that possible.

To use the email skill you need to configure the server info and account info on home, which is recommended, or configure the server info on home and use the config file to enter the account info.

See here for more information on configuring the skill:

1 Like

@brrn, Yes that is how I understood your instructions and followed them. And I was successful - for one day :frowning:
I got the skill to work with the credentials in /home/mycroft/.mycroft/mycroft.conf (in the recommended ~/.mycroft directory, it would complain that I have to configure the skill). But after I switched my Mark-1 on again after a few days, it would got stuck in the startup process (yellow eye syndrom). With the help of ake-mycroft we found the culprit to be the conf:
{“max_allowed_core_version”: 18.8}
{
“email_login”: {
“email”: "my.name@emailserver.de",
“password”: “Password1”
}
}
I do not know how the } got behind the 18.8 (instead of a comma), and why the skill would work before the shut down. When I corrected the conf to:
{“max_allowed_core_version”: 18.8,
“email_login”: {
“email”: "my.name@emailserver.de",
“password”: “Password1”
}
}
my Mark-1 would again function normally, however the answer to
“Check my email” always is
“There was an error getting your email. Try checking your credentials and server information”
But the credentials are correct and the server info is in home.mycroft.ai.
I have two mycroft.conf. This one in /home/mycroft/.mycroft and a larger one in /etc/mycroft. I also tried placing the conf into /home/pi/.mycroft with no success. Any thoughts?
Thanks for any hints how to debug this.

OK, further researched this. First I deinstalled and reinstalled the skill (through the market place), in between deleting all mentions of my email credentials from the conf files.
After reinstalling I put the server info into home.mycroft.ai and tried:

  • as described here placed the credentials into ~/.mycroft/mycroft.conf (newly created) -> Mark-1 requests that I setup the email skill on home.mycroft.ai.

  • put it into one of the available files at /home/mycroft/.mycroft/mycroft.conf resp. /etc/mycroft/mycroft.conf -> Mark-1 tells me to check my credentials because it cannot connect to the server.
    Today Mark-1 was updating to core 18.8.7B, everythin else runs smoothly.
    Ah, I forgot to mention, I do see my imap server address in the settings.json of the skill!
    I really think the email skill is one of the most useful skills. Please let me know, if I can help further to make it more reliable.
    Thanks for any support.

1 Like

Hey @Paul_Panther,
Thanks for debugging this! I’ve taken a look, and it does seem that there is an error retrieving from the config files, so this weekend I’ll fix it!
Thanks again for tasing the issue!

Edit:
I just fixed it. If you could try the skill by first uninstall the email skill then go msm install https://github.com/linuss1/email-skill.git
then make sure the credentials are correct in the /home/mycroft/.mycroft/mycroft.conf file and try to check your email.

Thanks for taking that up. Unfortunately it still is not working here.
I removed email-skill with msm (this left the mycroft.conf untouched), reinstalled per your command above, checked the server/port entry on home.mycroft.ai and the user/password in mycroft.conf (still all correct).
Anyway, I got the “Check your credentials…” message.
I tried with a different email account on the same server, but no luck.
Could it be that there is an issue with encryption of the login data? My email server (imap.1und1.de) uses “SSL/TLS”. Do I have to set the email transport security somewhere on the Mark-1 or in your skill?

Could you make sure that you use the Mycroft.conf in /home/mycroft/.mycroft/? and not the pi use directory. This was a mistake in the documentation that I looked over.
Secondly, make sure the port is 993, if it isn’t, try the port 143.
Thanks!

Yes I did. As described in your previous comment here. I have the settings in the mycroft directory and deleted any traces of mycroft.conf from the pi branch.
Further I verified, that imap.1und1.de uses the standard port 993.
One thing I am not sure about: After removing the old version of the skill, I did not wait until the skill settings disappeared in home.mycroft.ai. Would it make any difference, that the settings where already in home.mycroft.ai when I installed the new version of the skill?
I have no python experience. But if you give me clear guidance where to look and which debugging code to add, I could try and look closely what my Mark-1 is actually doing when running the skill.

Okay - solved this problem in Mattermost with @Paul_Panther - We identified and fixed the issue and I’ll be pushing the skill to the skill repo in the next week. :smiley:

1 Like

Hi Linus, thanks again for fixing the authentication issue. You ask for more proposals on how to improve the email skill. I am happy to chip in here:
Mycroft reads the list of unread emails always from the oldest to the newest. I’d prefer it the other, as in my email programs I also sort my emails such the the latest ones are at the top of the list. I looked at the skill code, I modified the init.py file on my Mark-1 and put reversed(…) into the for-loop.
But maybe, the sort order should be selectable from the options screen on home.mycroft.ai?

1 Like

Okay thanks for the suggestion! I’ll be adding this one as well! :grin:

1 Like

Alright, I just updated the skill, with several new features, including @Paul_Panther, switching the way Mycroft reads email (newest to oldest). The new skill testing topic is here:

3 Likes

Hello all!

I recently set up Mycroft and tried to install the e-mail skill. Because the IMAP server supports TTLS and not SSL i changed a few lines of code in the function list_new_email so as to read

M = imaplib.IMAP4(str(address), port=int(port))
M.startttls()

Then i installed it with msm install and proceed to make the configuration file in ~/.mycroft/email-skill. But when i tell my mycroft to “check my email” it replies that it cannot connect to the server.
I have tried to get emails from the python3 interpreter on my home computer and succeeded so i cannot figure out exactly what is the problem. Any ideas?

Thanks a lot,
Konstantinos

Sorry for double-posting but i fixed it! In python2 there is no function startttls() so i just removed this line and all works as supposed to!

1 Like