What are the best practices (or even just any way at all) of testing bulk email sends?
I'm using the Twilio SendGrid C# library with the built-in CreateMultipleEmailsToMultipleRecipients function. Here's an example of that function in the context of some code.
SendGrid does not appear to allow me to just send myself (i.e. a single email address) a ton of emails, it ends up only delivering only a few.
The end goal is that I want to see that my code is using the CreateMultipleEmailsToMultipleRecipients function correctly, and that it works for 100 users, then 1000 users (which is the supposed limit of that function IIRC).
Related
I am receiving chart data in JSON format to my email address and my goal is to convert it to chart/chart img and resend it to my email address.
I have been looking for several methods:
Google App script used for gmail. I failed to find trigger on newly received message.
Email client, that supports adding actions based on scripts to new incoming message trigger. Only one I know about is MS Outlook with VBA scripts, but creating chart image with lack of libraries available in VBA is not very elegant solution.
Open source email client with possibility to alter the code and so directly process data and resend message. The more robust email client, the harder is to change the code to do relatively simple job, I believe.
I really donĀ“t know what kind of solution this simple problem needs.
Thank you in advance.
Sounds like you are interested in some kind of gateway on the server side, not client-side. Take a closer look at your server-side implementation. For example, you may start from the Mail flow rules (transport rules) in Exchange Online page.
If company already subscribed to MailChimp do they need also Mandril to send transactional emails such as app welcome, invites to join or befriend, password recovery etc.
Can one send password recovery or welcome email as one person campaign programmatically using MailChimp alone? Or is it too expensive or too cumbersome?
I've been using Mailchimp for a while and what you are seeking can be partially managed with a featured called automation within Mailchimp. It allows you to:
Set up any number of emails as chained emails (so to say) which are triggered individually when something happens within the Mailchimp list. For example if someone joins your list, it triggers a welcome message. This automation requires in some cases no code and can be done relatively easy. You can see more automation examples here (of course you can use their API for more cool stuff).
For password changes notifications, email verifications and such transactional emails you could use Mandrill, but as an add-on within Mailchimp which has a separate pricing, where you can start free for the first 2000 emails.
I believe the automation on Mailchimp + a good use of their API to make changes on the list, could easily be put to good use to your advantage (haven't tried this combination yet but will do in the future, let me know if you find out something).
To answer more directly your question, yes, you can achieve a certain degree of automation with the automation part of Mailchimp (which is relatively new), but for a more granular control you definitely could use Mandrill as an add-on within Mailchimp.
Techically, you could create single person campaigns via the Mailchimp API.
But, Mailchimp has developed it's own anti-spam AI (Omnivore) that kicks in every time the campaign is ready to be sent, which analyzes the campaign and list data.
Since I had Omnivore block some of my campaigns for trivial reasons, I think it would be a matter of time before it finds a pattern in your workaround.
I've been reading up on sending mass email to a user-base, and I'm not feeling comfortable using the PHP mail function. It tends to be too simple, spammy and unreliable.
But that leads me to my question... for a custom application, what should I be using to send email to potentially hundreds of people? ...or is mail okay to use?
I appreciate the help.
I would use a third-party service. There are several of them. They ensure the emails are sent from white-listed IP's and have spent a LOT of money on legal prep for terms, privacy policy, etc to ensure the ISP's play nicely with the incoming mail.
If you're only sending mail to potentially hundreds of people, and not hundreds of thousands of people, PHP's sendmail will handle the load fine. You should be worrying more about the newsletter content and the opt-out easiness than the capability of PHP to send your email. For small campaigns to hundreds of people, check out MyEmma.com as an example of a small-list solution.
What you're probably looking for is an API to offload your email calls to and let a service handle the delivery for you. Sending a large number of email messages from PHP can be tricky as if it's not done quickly enough you run the risk of time-outs, and tracking which have been sent is always troublesome if you want to re-try a big batch.
Not surprisingly there are several companies which offer an email API service to make this sort of thing significantly easier than doing it yourself:
SendGrid (PHP example)
Mandrill (PHP package) from MailChimp
Postmark (PHP libraries)
PostageApp (PHP example)
MailGun (PHP sample)
While I'm a developer for PostageApp, but I encourage you to try out many of these to see what works best for you.
In most cases you need to re-write a small portion of your application to work with the particular API or library used to access the API, and once that's done you can send a very large number of messages with one quick call. The delivery of those messages becomes the responsibility of your provider.
The truth is that the less money you're willing to spend on email sending, the more things you have to do yourself, such as:
White listing your sender IP address (especially if you're on shared hosting this can be a PITA, because the other users can mess things up for you).
Setting up SPF and DKIM to add trust for mail hosts (Hotmail, GMail, etc.)
Checking bounce emails
Handling ISP complaints
This is also amongst the things that third party providers charge you for; if you don't wish to bother with any of the above, feel free to use providers such as Mailchimp, Bluehornet, etc. Make sure they provide what you need before you whip your wallet, some might have surprising hidden costs (such as charging you extra for API usage, use of transactional emails, life-cycle emails, etc.)
If you don't mind doing a few of the above (like checking bounce / complaint emails and making some simple DNS changes) you could sign up for Amazon SES; it has a proper API and their email charges are the lowest I've seen so far and recently they have introduced DKIM (signed emails) support. You can also configure your sendmail (assuming dedicated hosting) to talk directly to SES, so it's easy to hook up any mail() based solution and run it.
First, thanks for everyone that has helped me with this thus far.
The answer I was looking for is http://mandrillapp.com/
This is the service behind MailChimp and it rules in every way!
I have an application that sends emails when a user creates/modifies a record. I would like my users to be able to reply to the email that was sent to them and have the web application receive the email, parse it and update the record automatically. I have seen this done in web apps like Basecamp. The email usually says "Reply above this line", and if you simply reply to the email, you don't have to log in to the web application in order to update your ticket/conversation.
How can I go about implementing this sort of functionaly? (I'm not looking for a particular language implementation, but rather a language agnostic solution).
There are 2 ways you can do this:
You could use a Procmail filter to pipe the incoming email to your script. This would need some 'nix knowhow to setup - but it's certainly possible to do what you described via this method.
Use a service like MailGun - they do all the hard work of setting up and configuring the mail server stuff and expose it to you via a nice programmable web API. I've been evaluating it this week to solve a similar problem like the one you are having and I can tell you: it is really cool and I highly recommend you check it out yourself.
You'll need to implement a service/daemon that polls an email inbox for new messages. To relate an incoming email to the corresponding data, you can include an id in the outgoing email's subject.
I agree you should created a system to receive the incoming email but I don't necessarily agree that polling for it is the correct solution. Take a look at a blog post I wrote on the subject here. It relates to Rails but the concepts should work in any language. That's why we wrote the CloudMailin system to provide a better way of receiving the email.
Also you can use a unique from address for each email that would prevent the user from altering the subject line being a problem. The disposable part of an email address is useful for that. reply+user123#example.com for example.
I am working on generating emails using Java. I would love to use some sort of system where I can send out mass emails and ensure that the emails were received by the intended recipient (A. My code to send the emails worked and B.The emails were not marked as spam). How can I do this without setting up (and keeping track of) a couple hundred email addresses and then checking each one individually?
Thanks!
Jeff Atwood's latest blog post talks about several things you need to do when sending email to users:
So You'd Like to Send Some Email (Through Code)
Whenever I've needed to test a system like this, I simply use an override property in the code that substitutes my own email address, creating a loopback test.
I don't know how you're going to test the "not marked as spam" thing, without having at least a handful of test accounts at various providers. Every email provider uses different bayesian filters to filter out spam.