Advertisement
Guest User

Untitled

a guest
Jun 5th, 2012
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. 1. Install msmtp, a simple sendmail stand-in that sends mail via a relay host (which is what you want, in almost all cases):
  2.  
  3. brew install msmtp --with-macosx-keyring
  4.  
  5. The flag with-macosx-keyring will make msmtp use the MacOS keychain, which is a pretty secure way to keep your mail account password secure.
  6.  
  7. 1. Configure it as described [in this article](http://www.tuaw.com/2010/05/04/msmtp-a-free-tool-to-send-email-from-terminal/). Don't use the manual installation method described there, [Homebrew](http://mxcl.github.com/homebrew) (which we used in step 1) is way more convenient.
  8.  
  9. 1. Have mail use msmtp instead of sendmail by creating .mailrc with the following content (or adding it, it the file already exists):
  10.  
  11. set sendmail=/usr/local/bin/msmtp
  12.  
  13. 1. As we are going to use [mutt](http://www.mutt.org/) to send mail with attachments, we just symlink the .mailrc created above:
  14.  
  15. ln -s .mailrc .muttrc
  16.  
  17. If you already have a .muttrc, just add the following line to it:
  18.  
  19. set sendmail=/usr/local/bin/msmtp
  20.  
  21. 1. Add this function to ~/.bash_profile:
  22.  
  23. mail2kindle ()
  24. {
  25. echo ebook | mutt -s ebook -a "$1" -- example@free.kindle.com
  26. }
  27.  
  28. When adding this, you obviously need to replace example@free.kindle.com with the email address of your kindle.
  29.  
  30. 1. At Amazon's My Kindle page, add the sender address to the list of eMail addresses that are authorized to send books to your Kindle.
  31.  
  32. 1. You can now send eBooks to your kindle with the following command:
  33.  
  34. mail2kindle book.mobi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement