Sending newsletters in Rails 3 - ruby-on-rails

Is it suitable to use Mail Gun to send out newsletters (bulk emails)? We are currently using Mail Gun to send out transactional emails (i.e. for confirmation emails) Works great!
We are looking at Campaign Monitor and Mail Chimp for weekly email newsletters. Are these services more suitable for this kind of task?
One thing I find more convenient with Mail Gun, is their API is much easier to work with. Especially when sending "dynamic" / more personalized emails. For example:
Hello Foo,
Your total video plays is 1,291. You have 214 total comments.
Regards,
Awesome Web
On the other hand, the UI analytics / reporting provided by Campaign Monitor and Mail Chimp make it much easier to read, especially for someone non technical. The same applies for creating campaigns and templates.
And it is simple enough to use with Rails. Since the templates are created via ActionMailer instead of from the UI (as seen with Campaign Monitor and Mail Chimp).
Are there any deliver-ability advantages for newsletters, from using one of the services, that I should be aware of?

Disclaimer: Since I love their service I ended up knowing them personally
If you want to use only one service to send and track all your emails, you need an all in one solution. They are not many players on this segment and I guess that the Cloud Emailing platform Mailjet would be the best for you :
They let you send both marketing and transactional email.
They have great analytics: really actionable and easy to use.
They must cost about the same price as Mail Gun, or maybe even less (30,000 emails cost something like $7 for example).
Last but not least, they optimize your deliverability (authentications, IP reputation, etc.).
On top of all this, Mailjet's API is well documented and makes you able to personalize the messages. And they even have an official Ruby Gem.
If you want a clear and objective overview of what exists, you can easily compare the different actors here.

Related

Inviting event attendees programatically on iOS 10

I've been using Stackoverflow for about 5 years now, and haven't felt the need to ask a single question yet, I've always found the answer i needed through previous threads. That just changed and I have a question that I really can't figure out. And it sounds so easy to do.
So the question is; how do you invite attendees, or reply/decline to calendar events on iOS under iOS 10? And please, no we don't want to bring up an EKEventViewController. We'd like to do this in our own UI. Under iOS 9 this was possible through just forcing EKAttendees objects in to the EKParticipants array with setValueForKey:. But under iOS 10 this produces an error saying 'Attendees can't be modified'.
I have used a Technical Support credit with Apple and got the reply that this was not possible. It is not possible using their APIs.
The closest to an answer i've got is to use IMIP (https://www.rfc-editor.org/rfc/rfc6047#section-2.2.1). If that's the way to go, could someone help me along on how to actually set that up? I'm not well versed in back-end development, I'm all front-end so I wouldn't really know where to start.
There also seems to be some CalDav servers on GitHub (https://github.com/mozilla-b2g/caldav) but I'm not sure how good they are, or exactly what you need to set one up.
So basically, is there anyone who could give a childs explanation to just how the heck we can send nice invites to calendar events. And if there are different solutions for Google, Apple accounts (obviously under the hood, but implementation-wise) that would be very helpful to know to.
Is this something that requires a ton of implementation on our own servers or is there some reliable service to use? That would be ideal. Maybe you should build one and you got at least one customer here :-)
Appreciate any help!
You cannot modify attendees using EventKit, but Apple already told you that:
I have used a Technical Support credit with Apple and got the reply that this was not possible. It is not possible using their APIs.
The hack with accessing the internal objects using KVC was, well, a hack and not documented API. No surprise they killed that.
So how do calendar invites work. That in itself is a very complex topic (consider delegation, resource booking like rooms, etc etc). There is a whole consortium which works on that (CalConnect), they also have a broad overview: Introduction to Internet Calendaring and Scheduling.
If you are serious into scheduling/calendaring software, it may make a lot of sense to join CalConnect for their interop events etc.
But you wanted a 'childs explanation'. I can't give that, but a short overview.
iTIP
iTIP is a standard which defines how scheduling messages flow, e.g. that you send a message to your attendee, your attendee responds back with accept/decline, what happens if a meeting is cancelled and all that.
It does NOT however specify how those messages are transferred. It is just a model on how the message flow works between the organiser and the participants.
Most 'big' calendaring systems (Exchange, Google, CalDAV servers like iCloud) use iTIP or at least something very similar.
iMIP
iMIP is a standard which defines on how to exchange iTIP messages using email. Say if you invite someone using iMIP, you'll send him a special email message with the iCalendar payload containing the invite. If your attendee accepts, his client will send back another iCalendar payload via email containing that.
iMIP is supported by a lot of systems and was, for a long time, pretty much the only way to exchange invitations between different systems (say Outlook and Lotus Notes).
However: the iOS email client does NOT support iMIP (unlike macOS or Outlook). So if someone sends you an iMIP invite to your iOS device, you won't be able to respond to that. (reality is more complex, but basically it is like that)
CalDAV
CalDAV is a set of standards around calendars stored on a server. Many many servers support CalDAV. E.g. iCloud uses CalDAV. Yahoo, Google, etc all support CalDAV. The important exception is Exchange, which doesn't support it.
In its basic setup CalDAV just acts as a store. You can use HTTP to store (PUT) and retrieve (GET, etc) events and todos using the iCalendar format.
In addition many CalDAV servers (e.g. iCloud) do 'server side scheduling'. That is, if you store an event to the server which is a meeting (has attendee properties), the server will fan out the invitations. Either internally if the attendees live on the same server, or again using iMIP.
Exchange
Exchange supports iMIP but not CalDAV. You usually access it using one of its own web service APIs, e.g. ActiveSync or Exchange Web Services. I'm no expert on them, but I'm sure that they allow you to create invites. Exchange&Outlook have an iTIP like invite flow.
etc
Is this something that requires a ton of implementation on our own servers or is there some reliable service to use?
This really depends on your requirements and needs. Do you need to process replies or just send out generic events?
If you want to host a calendar store, it probably makes sense to use an existing CalDAV server.
Calendar invitations are a very complex topic and you need to be very specific on your actual requirements to find a solution. In general interoperable invitations in 2017 are still, lets say 'difficult'.
P.S.: Since you've been using StackOverflow for about 5 years now, you should know that this question is too broad for this thing.

"Unsubscribe" for email categories/types through Sendgrid, Mailchimp, SES

I've got a Rails 3.2 app that will need to send various transactional & bulk (marketing) types of emails. Ideally I'd be able to use a service (like Sendgrid or Amazon SES) to improve deliverability and for unsubscribe support. I've mostly used Sendgrid in the past, but I need the 'unsubscribe' to be just for a specific category of the email (there are around 6 categories). I can't have someone unsubscribing from a marketing email and miss out on notification or invitation emails. Does anyone know of an service that supports this, or does this just have to be done internally? It seems like there's a lot to deal with related to best practices for deliverability, list-unsubscribe, etc. if you manage it yourself.
I see this discussion on sendgrid, but seems to be pending still:
http://community.sendgrid.com/sendgrid/topics/unsubscribe_and_categories
I'm happy to go with any service if it integrates relatively easily with Rails and can support category/type based subscription management. Or perhaps a hybrid approach with different services or separate accounts on the same service, if they allow that for the same domain?
I very much appreciate any feedback on how others have tackled this.
Thanks!
SendGrid is currently developing this feature and we hope to have it out shortly. There isn't an exact time for the release of this feature yet but it sounds like it is just what you are looking for. Check out SendGrid's blog, it will be updated when this feature is available for beta testing.
http://www.sendgrid.com/blog
Thanks
Brian
It looks like CritSend(1) have what they call "tag" support and state the following on their site:
Our unsub processing is done per tag, so if someone unsubscribes from
one of your emails tagged "newsletter1" that does not unsubscribe them
from any other tag.
The one thing that is unclear is the level of Ruby support.
CritSend name MxmConnect as the gem to use for sending emails. There is a critsend_events gem for the CritSend Events API.
(1) Note, I have no affiliation with CritSend

EDITED:How to send payments to users every month?

I want to pay my users(share profit) automatically every month using PayPal.
I read a lot about PayPal and all features. I need to configure sending payments depends on some statistics from my database.
I'm using Rails and will appreciate all any help !
Can I rewrite or change something in recurrung bills gem to pay my users ?
There are several scheduling gems for this purpose:
https://www.ruby-toolbox.com/categories/scheduling
If you are using a payment gateway such as paypal, they have support for reccuring billing. Most payment services support this. I don't know if it is possible to set up a timer like you describe in the question, but I would definitely not rely on it. What about performance and what if your app goes down?
Take a look at activemerchant and this railscasts episode.
Maybe this paypal documentation is helpful too.
On the PayPal product family, take a look at Adaptive Payments. One of the features is the ability to do what's called Implicit Payments. Essentially this feature givves you the ability to programmatically send money out of your own account, to pay somebody else.
You simply need to write the script to determine the receiver's email address, the amount you want to send them, and make the API call with that information.
Check out page 25:
https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_AdaptivePayments.pdf
Although it's probably easier to write your own API call (It's basically and HTTP POST request, with some additional headers), you could probably tweak the ActiveMerchant library to do it for you.

Rails sms, email and voice messaging framework

Is there a framework built in rails that lets me do something like send a message and then based off of user preferences automatically determine whether a text message, voice message or email message should be sent (or any combination of the 3 options)?
Also, if there is a framework like this, does it have support for receiving text messages or email messages and taking actions?
I know this is a big ask. The reason I am asking is because I have started implementing a system like this and am considering making it open source but I am curious if there is anything out there like this already that I should learn from first before publishing my system.
A full blown framework? No.
A helper library that does 95.2% of what you're looking for? Yes.
Using the Twilio gem - https://github.com/twilio/twilio-ruby - you can send SMS or Voice with a handful of lines of code. You don't need to know their mobile carrier either, you can just send the SMS/Call for pennies per message/minute.
If you need a hand with it, I'm happy to help. You can reach me at keith # twilio.com.

How do I make yahoo unblock the images that come with the emails coming from our server?

How do I make yahoo unblock the images that come with the emails coming from our server?
For HTML email, which is a wild beast at the best of times, you should be using some kind of starting template before embarking on any sort of customization. There are a number of examples out there that are excellent reference but Campaign Monitor has made a serious effort to promote best practices.
http://www.campaignmonitor.com/templates/
It may be helpful to use an email previewing service like Litmus to verify your messages are being transmitted as intended:
http://litmusapp.com/email-testing
Is it all yahoo users or just some? Many users turn off images in email for privacy reasons (to prevent companies from using image requests as a confirmation that someone got an email.)

Resources