Skip to content

Instantly share code, notes, and snippets.

@hSATAC
Last active March 20, 2018 04:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hSATAC/b4c8f67a40f209e08e10779074d834cf to your computer and use it in GitHub Desktop.
Save hSATAC/b4c8f67a40f209e08e10779074d834cf to your computer and use it in GitHub Desktop.
Send Mobi to Kindle on MacOS Terminal

Send Mobi to Kindle on MacOS Terminal

Prerequisite

Config

# ~/.muttrc
 set sendmail=/usr/local/bin/msmtp
# ~/.msmtprc
defaults
auth           on
tls            on
logfile        ~/.msmtp.log
tls_certcheck off

# Gmail
account        gmail
host           smtp.gmail.com
port           587
from           youracc@gmail.com
user           youracc
password       apppassword

# Set a default account
account default : gmail

Usage

# ~/.config/fish/config.fish
function send_to_kindle
    echo mobi | mutt -s mobi -a "$argv[1]" -- yourkindle@kindle.com
end
$ send_to_kindle ebook.mobi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment