danchoi / vmail

a vim interface for gmail
http://danielchoi.com/software/vmail.html
MIT License
786 stars 60 forks source link

vmail -g option does not work (to gather my Gmail contacts for autocompletion) #218

Open JinraeKim opened 4 years ago

JinraeKim commented 4 years ago

Error report

Hi, I'm trying to load my Gmail contacts automatically by -g option, i.e., vmail -g.

When typing the command and press Enter on Terminal, an error message is displayed:

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/net/imap.rb:1219:in `get_tagged_response`: Unknown Mailbox: [Gmail]/["Sent Mail"] (Failure) (Net::IMAP::NoResponseError)

After this, vmail-contacts.txt file is generated without any contents (empty file).

My setting is as follows:

Note

tom-adsfund commented 4 years ago

Same here.

notalex commented 4 years ago

@JinraeKim, I apologize for the late response. Your issue is appropriate. I will try to replicate this issue on my end. In the meantime, the easy way to load gmail contacts is to export contacts out of Gmail: https://support.google.com/contacts/answer/7199294?co=GENIE.Platform%3DDesktop&hl=en

Find or create a file with the path ~/.vmail/\<username>/vmail-contacts.txt (\<username> is the name of the folder containing .vmailrc). Vmail will read your contacts from there. It has to be a simple file with one contact per line. For example here is a sample from my vmail-contacts file:

~/.vmail/notalex/vmail-contacts.txt

foo@gmail.com bar@gmail.com Example User \example@gmail.com\

tom-adsfund commented 4 years ago

@notalex The approach you've suggested doesn't really do the same thing: the people I send emails to are mostly not in my contacts.

notalex commented 4 years ago

@tom-adsfund, if you need to send emails to other accounts(not in your Google Contacts) and you need Vmail to autocomplete them; you could simply add those emails in the vmail-contacts.txt file and vmail will autocomplete them with the default Ctrl-x Ctrl-u mapping. Let me know if this addresses your need.

JinraeKim commented 4 years ago

@notalex Thank you for suggesting an alternative way to loading contacts, and it works well. However, I felt this way is still not comfortable :( But I've really been impressed by this project as a user of vim :) Good luck!

P.S. I think it will become more comfortable if I can load contacts of Gmail easily and sending emails to a group via shortcut.