I use gmail gem to send emails and I need to track these emails. How can i do this?
I am trying to do an email search using message_id, but it will deliver all the emails from my inbox, and I only need the responses of a particular email.
Here is my actual code:
* save email using message_id *
mail = gmail.deliver(email) Email.create(:message_id => mail.message_id, :from => user.email, :to => annotation.to, :body => annotation.content, :title => annotation.title, :annotation => annotation, :user => user)
* search for messages using message_id *
messages = gmail.inbox.mails(:message_id => email.message_id)
Hi,
Fabrizio Ferrari de Campos
source share