Jarvis can send emails on your behalf using nothing but your voice. The entire interaction is conversational: Jarvis asks who the email is for, listens for the recipient address, asks what to say, listens for the message body, and then sends the email over SMTP. All connection details — server, port, username, and password — are stored inDocumentation 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.
config.ini so the source code never needs to change between accounts.
Prerequisites
The[EMAIL] section of config.ini must be filled in before the email command works:
Voice interaction flow
Trigger the command
Say “mail” to activate
command_mail(). Note: the Ubuntu version (Jarvis2.py) checks for "email" instead; the Windows version (Jarvis2_4windows.py) checks for "mail".Speak the recipient address
Jarvis asks “Who is the recipient?” and listens. Speak the full email address of the person you want to send to (e.g.
friend@example.com).Dictate the message body
Jarvis asks “What should I say?” and listens. Speak your full message. The transcribed text becomes the email body.
The command_mail() function
SMTP connection flow
The function establishes a secure SMTP session in the standard way:| Step | Method | Purpose |
|---|---|---|
| Connect | smtplib.SMTP(server, port) | Open a TCP connection to the mail server on port 587 |
| Handshake | server.ehlo() | Identify the client to the server (Extended HELO) |
| Encrypt | server.starttls() | Upgrade the connection to TLS before sending credentials |
| Authenticate | server.login(username, password) | Log in with the credentials from config.ini |
| Send | server.sendmail(from, to, body) | Deliver the message |
| Close | server.close() | Gracefully terminate the SMTP session |
The email body sent by Jarvis is plain text with no subject line or MIME headers. If your mail client shows the message as raw text rather than a formatted email, this is expected behaviour. Adding a subject and MIME formatting would require wrapping
content in an email.mime.text.MIMEText object before calling sendmail().