Questions tagged [mail-gem]
38 questions
0
votes
1 answer
body of mail doesn't contain returns(\n) when using ruby's Net::IMAP library
I am using Ruby's Net::IMAP lib to fetch mail and am using Mail gems read_from_string function to get the body but what happens is the mail containing html part is displayed correctly but the one with only text/plain part are displayed continuously…

daredevil11
- 107
- 14
0
votes
0 answers
How could I pass parameter to this block
I want to send an email every day with a different attachment. So I think I should pass the parameter to mail's initialize block. I read some articles about ruby block but I can not find the right way to implement it. How could I do it the right way…

greyby
- 156
- 1
- 8
0
votes
1 answer
Rails Mail gem finding out recipient
I collect all Mails from a pop server with Mail.all
@currentmails = Mail.all
# Über alle Mails im Postfach Iterieren
@currentmails.each do | mail |
puts mail.to
end
But mail.to doesn't work ... I got this error:
NoMethodError: undefined…

Felix
- 5,452
- 12
- 68
- 163
0
votes
1 answer
Mail Gem: Render received email in browser / Full parse of html parts
I am working with the Mail Gem to receive emails in my Rails 4 application. The mails are grabbed via POP from a mailbox, every 10 minutes or so, via the Gem.
I need to render these emails - mostly in HTML format - and am having trouble saving…

Eskim0
- 775
- 7
- 17
0
votes
2 answers
forward email with attachments
I would like to do this without downloading the attachments and then re/attaching to the new email.
This is what i have tried:
$emailslist.each do |e|
Mail.deliver do
from fromstr
to "mailman@somedomain.com"
subject "[Events]…

fartagaintuxedo
- 749
- 10
- 28
0
votes
2 answers
How to specify who is sending the email with the `mail` gem?
I am sending emails with the mail gem, using the very simple code below. When I'm sending an email, the smtp_account.user_name and the smtp_account.from could be e.g. support@thebestcompany.com. This causes the recipient to see that he has received…

Cjoerg
- 1,271
- 3
- 21
- 63
0
votes
2 answers
Rails 3 - ActionMailer/Mail gem - 'from' address is being over ridden
I have a simple contact form on a site.
There is an email account just to handle the mail being sent through the contact form. This is 'mycompany.noreply@gmail.com'
The problem
When a user fills in the form and sends it, two emails are sent. One…

veritas1
- 8,740
- 6
- 27
- 37
0
votes
1 answer
Rails mail render empty mail body in production
I use rails Rails 3.2.3 and Resque to send an emails.
For some strange reason emails on production sended with empty body.
I try reproduce problem localy but with no luck.
production log does not have anything strange
Sent mail to…

Volodymyr
- 1,136
- 3
- 11
- 28