Questions tagged [pony]

The express way to send mail from Ruby.

81 questions
2
votes
2 answers

How do I test Pony emailing in a Sinatra app, using rspec?

I'm trying out email_spec, which says it supports Pony, but I'm not sure how I'd go about testing emails in a sinatra app. The examples in the readme show usages with rails ActionMailer, but not in Pony. Not precious about using email_spec, so any…
zlog
  • 3,316
  • 4
  • 42
  • 82
2
votes
1 answer

pony doesn't send email to gmail address?

I've got an entry form that asks for a persons name and email address. I save that email address to the session so I can access it after the form has been submitted. Then I use Pony to send a thank you/notification email to the person who submitted…
YuKagi
  • 2,451
  • 3
  • 21
  • 26
2
votes
1 answer

Pony and Sequel associations conflict?

I've run into an issue when using Pony and Sequel in a Sinatra application. Without Pony everything goes just fine, but just requiring Pony sequel's associations break. Here's my models for a blog: class Post < Sequel::Model one_to_many…
keepitterron
  • 1,052
  • 1
  • 8
  • 12
2
votes
2 answers

Sending email with attachments in Ruby with the Pony Gem

I am writing a script that is going to be sending out emails to a list of people and with this email there is going to be an attachment. I keep running into this issue: /usr/local/lib/ruby/1.9.1/net/smtp.rb:942:in 'check_response': 552 sorry, that…
dennismonsewicz
  • 25,132
  • 33
  • 116
  • 189
2
votes
1 answer

ValueError: Attribute Users.request is required

I need help again. Can anybody tell my why I get this error? I use Flask and pony orm and python 3.4. I have few files. users.py from app import models from pony.orm import * class UsersAPI: @staticmethod @db_session def…
John Smit
  • 159
  • 1
  • 1
  • 8
2
votes
1 answer

Connection refused when using Pony Mail & Sinatra

I am having a lot of trouble getting the Pony Mail gem to work with my Sinatra website (deployed on Heroku). I am aiming to have a basic contact form where a visitor can fill in an email and a subject, their email and phone number and this form will…
2
votes
1 answer

Ruby Pony emails ssl issue

I am having trouble getting pony to work. Right now I am getting an error: TypeError: wrong argument (NilClass)! (Expected kind of OpenSSL::SSL:SSLContext) I am using Pony.rb with smtp and here is the method call so far: class Email def…
Blaine Kasten
  • 1,633
  • 1
  • 15
  • 27
2
votes
1 answer

How to use body erb template in Mail gem?

I would like to use as body in Mail erb template. It works when I set up it on Pony gem. post 'test_mailer' do Mail.deliver do to ['test1@me.com', 'test2@me.com'] from 'you@you.com' subject 'testing' body erb(:test_mailer) # this…
tomekfranek
  • 6,852
  • 8
  • 45
  • 80
2
votes
1 answer

How to test Mailer on Sinatra post request?

I have Sinatra app which sends email on post request: post '/test_mailer' do Pony.mail( to: 'me@mine.com.au', from: 'me@mine.com.au', subject: 'Howdy!', body: erb(:body) ) end So I want to test this behaviour using: require…
tomekfranek
  • 6,852
  • 8
  • 45
  • 80
1
vote
2 answers

To minimize memory usage, should I choose Pony's :sendmail or :smtp mode?

I'm using the Pony gem to send emails. Assuming that I have both options open to me, is there a memory advantage to using :smtp or :sendmail? Option 1: smtp Here, Ruby connects directly to the SMTP server. Pony.mail( :to => 'you@example.com', …
Seamus Abshere
  • 8,326
  • 4
  • 44
  • 61
1
vote
2 answers

Rails Mailer Ubuntu

In my rails application (running on a mac), I'm using a gem called pony. When I create a message through pony I get the following output (out of a rails console). #
jack
  • 454
  • 2
  • 8
  • 22
1
vote
1 answer

How can I attach a file as an option in Pony and Sinatra?

I have problem in attaching a file as an option in Pony and Sinatra, how can I specify attachment options in Pony?
sillyfem
  • 11
  • 2
1
vote
1 answer

how to define a foreign key with pony entities

I would like to define a foreign key with pony entities. If I understand it right, there is no need to define a primary key as long as it is named id. so the primary key of Jobs is id, and I want to define a foreign key job_id on Recipe which is…
Josh.h
  • 71
  • 1
  • 13
1
vote
3 answers

How to format email for gmail?

I wrapped the email's body in
. Show original in gmail gives me actually how I want the email to be formatted:
Mime-Version: 1.0
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: 7bit


Ant run name    : Basics of…
Radek
  • 13,813
  • 52
  • 161
  • 255
1
vote
0 answers

Net::SMTPAuthenticationError at /contacts 535-5.7.8 Username and Password not accepted Sinatra Ruby

When I send a simple form with Sinatra's help, it shows this error: Net::SMTPAuthenticationError at /contacts 535-5.7.8 Username and Password not accepted Ruby Sinatra What versions of the programs: OS: Windows 7/64 Ruby version: ruby 2.6.3p62…
Denis L
  • 237
  • 2
  • 13