Jarvis can send an email entirely by voice. SayDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Harsha200105/DesktopAssistant/llms.txt
Use this file to discover all available pages before exploring further.
"mail" or include "email" in your command, and Jarvis will prompt you to speak the recipient address and then dictate the message body. Under the hood, commands.py opens an SMTP connection to the server configured in config.ini, authenticates, and dispatches the message — all without touching a keyboard.
Gmail setup
Gmail blocks plain-username/password logins from third-party apps by default.
Choose one of the following options based on whether you have two-factor
authentication enabled:
Replace
you@gmail.com with your Gmail address and yourpassword with either
your account password (less-secure-apps path) or the 16-character App Password
(2FA path).The
command_mail function calls take_command() twice — once to capture the
recipient and once to capture the message body. Both calls go through the
speech recogniser, so a working microphone is required unless you are running
with debug = True.Voice interaction flow
Once setup is complete, triggering the email command works like this:- Say a phrase that includes
"mail"— for example “send a mail” or “email”. - Jarvis replies “Who is the recipient?” — speak the recipient’s full email address.
- Jarvis replies “What should I say?” — dictate the message body.
- Jarvis sends the email and confirms “Email sent!”, or says “I am unable to send your message at this moment!” if an error occurred.
How the SMTP code works
Thecommand_mail function in commands.py handles the entire flow:
| Step | Method | Purpose |
|---|---|---|
| 1 | smtplib.SMTP(server, port) | Opens a plain-text connection to port 587 |
| 2 | server.ehlo() | Identifies the client to the server (ESMTP handshake) |
| 3 | server.starttls() | Upgrades the connection to TLS encryption |
| 4 | server.login(username, password) | Authenticates with your credentials |
| 5 | server.sendmail(from, to, content) | Sends the email (both From and To use the configured username) |
| 6 | server.close() | Closes the connection cleanly |
config['EMAIL'] dictionary is populated at module import time via:
Security considerations
The recipient address is captured directly from Google’s speech recognition
output. Addresses that contain unusual punctuation (dots, plus signs,
subdomains) may not be recognised accurately. If the recognised text looks
wrong in the terminal, use
debug = True mode and type the address instead.