Questions tagged [mail-gem]

38 questions
1
vote
1 answer

using ruby to extract email body from Microsoft graph rest api outlook message

I am fetching emails from Outlook through Microsoft Graph or Rest Api directly from Ruby without using any Microsoft SDK. The problem I am facing is that I can't get the email message body from the response returned by Microsoft. Using the Ruby Mail…
brg
  • 3,915
  • 8
  • 37
  • 66
1
vote
2 answers

Ruby mail gem - search inbox from specific email addresses

Does anybody know how to get mail from an array of email addresses using the 'mail' gem in Ruby? I've seen the thread for getting unread messages like so: new_messages = Mail.find(keys: ['NOT','SEEN']) But I cannot find how to get messages from a…
user8071606
1
vote
1 answer

ruby's Mail gem: how to see if attachment is inline

Say, i have a raw mail message in a file and i read it like m = Mail.read '/path/to/file' it has attachments, one of which is an inline pic. pic = m.attachments[0] => #
Stepan Salin
  • 179
  • 1
  • 1
  • 10
1
vote
0 answers

How to avoid execution expired errors while using 'mail' gem

I'm working on a webscraper that will send out a weekly CSV with new content with Ruby. For the mailing component I decided to use the Mail gem. After a great deal of tinkering I got it to send a few test emails. However, I frequently get this…
Nicholas S
  • 25
  • 6
1
vote
1 answer

How to parse an email faster than the Mail gem does it?

# The Problem # When parsing millions of emails, the method Mail.read_from_string(mail_as_string) is too slow. # The Question # How can I speed up email parsing? # The Context # I have put in enough context for you to understand my use case.…
Cjoerg
  • 1,271
  • 3
  • 21
  • 63
1
vote
0 answers

Ruby Cucumber Gmail Gem - how to click a link in email body

I have searched the net upside down for this answer, but I can't seem to find it. I've tried various methods but they aren't working. Goal: Using ruby cucumber, to click a link within an email I have received. Seems simple right? Using the gmail…
MelissaH
  • 11
  • 1
1
vote
1 answer

Can not set :DELETE flag on GMail Inbox using rails mail gem

I am getting this error when trying to set the deleted flag; Net::IMAP::NoResponseError (STORE attempt on READ-ONLY folder (Failure)) The error is thrown when running this; connector.uid_store(item_uid, "+FLAGS", [:Deleted]) This code runs fine…
Cy Walker
  • 41
  • 5
0
votes
1 answer

Rails ActionMailer Quoted Printable Encoding breaks the output

I have this html message that I would like to send using MIME format through a rest api call ( using microsoft send email api ). @message = "
Imam
  • 997
  • 7
  • 13
0
votes
1 answer

Adding inline image in mail body using Mail Gem

I am using Mail Gem for sending email. I am trying to send .PNG files using inline image tag like below record_stream << "

Jeff added an image today.

" .concat( " " ) mail = Mail.new do from …
Mani
  • 2,391
  • 5
  • 37
  • 81
0
votes
1 answer

How to find the original email in a forward using the Mail gem

How do I use the Mail gem for Ruby to extract the original message HTML content/text content from a forwarded email? So far all the examples I see are related to extracting content from replies (not forwards), which is made a lot easier because you…
Verty00
  • 726
  • 5
  • 16
0
votes
1 answer

How do I set retriever_method not in defaults?

Setting the delivery_method immediately within the delivery block instead of setting the defaults to send seems to work well with the following code: Mail.deliver do delivery_method :smtp, address: "smtp.gmail.com", domain:…
Nakilon
  • 34,866
  • 14
  • 107
  • 142
0
votes
1 answer

Sending smtp email via mail gem results in 554 5.7.0 Reject

I'm trying to send emails from a rails application using smtp. Sending the emails does not cause problems, but some recipients do not receive the emails. Instead, delivery notices ("Undelivered Mail Returned to Sender") are returned…
fiedl
  • 5,667
  • 4
  • 44
  • 57
0
votes
1 answer

Ruby Mail Gem Relay Access from Localhost to Postfix

I'm on a workstation that doesn't have a FQDN. I'm developing in Ruby and using the mail gem. I host my own mail server on the LAN. I want to forward outgoing emails to this server, off to a gmail recipient (example). Due to the fact I'm on my…
Rich_F
  • 1,830
  • 3
  • 24
  • 45
0
votes
2 answers

How to send an email with mail gem in ruby on rails

I am trying to send an email using mail gem. But Unfortunately it is not working. This is my controller. def create fn = params["firstname"] ln = params["lastname"] email = params["email"] file = params["file"] …
click
  • 447
  • 1
  • 7
  • 25
0
votes
1 answer

How to retrieve emails from multiple emails addresses using pop3 of gem mail in Rails?

in my project I will have to write different cron jobs to read emails from different email addresses to do different tasks. I am using mail gem but the problem is, retriever_method is singleton. So when I'll mention the new email address and new…
user5412340