public_send method_missing in spree with postmark - heroku

After install postmark gem and edit config/application as instruct. I try forget password in Spree but error shown in User Screen.
At the heroku logs I found the step public_send shown method_missing.
Don't know what missing?

Since it was a new web setup. The return email from postmark send back to that email asked to activate before send mail would work.
So I just click Confirm Signature then try again it worked.

Related

How to forward message responses with ruby Lita?

I am working with a chatbot operating on the lita ruby gem using lita-hipchat. After a response is made to lita using hipchat, lita will be able to return messages to the user who created the response through the reply method. I would like to change this pattern and be able to send a hipchat to a secondary user, essentially being able to cc or forward that same response to more than one user. Is this possible using only the Lita gem?
I am aware that sending messages through http or the hipchat gem is another option for sending messages to secondary users, but I would prefer to do this through lita.
You can do this using Robot#send_messages. For example:
def my_handler_route(response)
user2 = Lita::User.find_by_id("user2")
target = Lita::Source(user: user2)
robot.send_message(target, "This message will go to User2!")
end
This is essentially what Response#reply is doing—but with the convenience of automatically targeting the original source.

Invitation to connect with linkedin api

I wonder how can I send invitation to connect via linkedin-oauth2 gem?
I don't mean sending email or inmail, but simple invitation to connect, like friendship in facebook.
I just patched a version of the linkedin gem to include the connect_by_email(email) method. https://github.com/brianpetro/linkedin
For example:
client.connect_by_email("you#example.com")
Hope that helps.
I applied this to an oauth2 fork in case anyone needs it.
https://github.com/benbruscella/linkedin-oauth2

does pony send response when it fails?

i've been using ruby pony gem to send emails
https://github.com/benprew/pony#readme
unfortunately documentation is not as big as i wish, just shows few methods to send email, but seems that doesnt return any message when the mail cannot be sent.
does anyone have this trouble ? so i wish to know if pony was not able to send email to tell the user that couldnt happen.
should i try with exceptions ? i'm new in ruby so i have tiny knowledge to make a decition.
Kind regards.
Pony can throw exceptions from the Net::SMTP or Mail gems on failure, so you can catch that exception and show the user the error message. See posts like this on the Google Group, though details are a bit scarce.

Email events in Sinatra

I am working on a Sinatra web app that needs to save any email that it receives in a db (or do something else as soon as a mail is received). What is the best tool for this job? I was looking at eventmachine and it seems a bit complex. I was considering the mail gem but it doesn't trigger events when mail is recieved. One final query: To test such an app, do I need it to host it online? If not, then how to do I send emails to the app and test?
Thanks a lot,
So Sinatra is a web server. Email doesn't come in from HTTP requests, so you need a mail server to receive the emails and assuming you still want to handle them in your Sinatra app, fire a request at your app.
check out http://steve.dynedge.co.uk/2010/09/07/incoming-email-in-rails-3-choosing-the-right-approach/ for a few options (it's thinking rails, but you should be able to translate)

Receive email in Ruby sinatra

Is there some way to receive emails with Sinatra? I've seen the pages that say how to do it with RoR, but none without. I have also found out how to send emails with the gem Pony. Thanks!
I believe you are looking for the mail gem (github). It has send and receive capability.
Update: I forgot that there is a Google Group too
Rails uses mail gem in order to send and receive emails. This gem can be used in Sinatra just as easily.

Resources