How to build an email alert system - email

We are building an email alert system which needs to send customized emails in real time based on certain criteria (think Google alerts). The application sends emails to multiple users from a web application currently implemented using a JMS bean that uses JavaMail to make the email sending asynchronous.
We were wondering if there are other utilities out there that might make this task a little more scalable and manageable.
On an related note, we have had major issues with Gmail (our mail server) while trying to send out bulk emails in this fashion (We sometimes send hundreds of alerts at a time). Managing our own mail server is an option, if that would help us scale this.

I think a good candidate for this is the Amazon Simple Email Service, introduced earlier this year: Amazon SES
It's part of Amazon Web Services (which include S3 (storage), EC2 (Elastic Compute Cloud) and various others).
We've been using AWS as a testbed for various things which would be impractical to host on our own infrastructure and have found it to be very nice to use.

Related

What are the best practices for receiving inboud email?

We are building a ticket system which is supposed to send and receive email. Sending email is relatively easy and can be accomplished in a modular way using SMTP. However we also need to support inbound email. To my understanding there are three main roads we can take.
Implementing inbound SMTP, which to my knowledge is quit hard and hard to maintain.
Using a SaaS such as (SendGrid, Mailgun, etc) which will deliver incoming email through web hooks. This however increases cost and makes the application dependent on this particular service (we are open source).
Using IMAP. This seems to be the most modular approach to me, but IMAP is a more user centric protocol. I also can not find any good experience about using this for incoming mail.
What are your experiences and what do you suggest?

Microsoft Azure Websites - Custom domain mail

Microsoft Live Custom Domains are now shutting down. I have been using this service for e-mail hosting for all my Microsoft Azure Websites, but now it is gone and no viable replacement is in sight. Do you have some idea what alternative approach exist for hosting multiple mailboxes for multiple websites hosted on Azure?
Your cheapest option is to have one (single) google apps account which will cost you around $5 per month. Make it something very general like mail#yourdomain.com. Then in the google apps dashboard make it a catch all address. This will make the single inbox catch all email for accounts such as Sales#, support# bob# or whatever at your domain.
Then you can set Gmail filters to sort (label) each incomming message based on who it was sent to. For example you can have messages sent to frank# automatically labeled as frank.
Next you want to create regular old gmail accounts for all of your individual users. I am going to follow the example of creating a box for frank#company.com for this instance.
Create Google Apps primary account (catch all) as mail#company.com
Create Gmail account for frank.company#gmail.com (regular gmail account)
Create filter rule on Google Apps account for all messages sent to frank#company.com to be forwarded to frank.company#gmail.com. You can further mark them as read or delete them upon forward.
In the frank.company#gmail.com create a sending alias as frank#company.com. Google will give you a 4 digit code, and now when logging in as frank.company#gmail.com i can both send as frank#company.com and recieve all email since its forwarded to this account.
Also make sure to set default reply:to addresses in case you send from the frank.company#gmail.com address.
Using the technique above you can get all the benefits of having a pro google apps account (dkim, spf, 25gb inbox) and with a little bit of configuration you can setup multiple gmail accounts which run off the single account. We use the technique above and it works flawlessly. The only thing that doesn't work is mailbox delegation, which is not that great.
If you wanted to save the $5 you could get away with using something like GoDaddy free email forwarding, but then you would be limited to godaddys 250 message limit per day.
The approach above just works.
I feel your pain. Had to have some tough talks with many of my customers when the free Google Apps option was discontinued.
I found two routes:
Find a hosted Exchange type solution. This has the advantages of any hosted solution. It is managed for you. You can get started with around 50 USD / user / year and services are provided by the likes of Microsoft, Google and Rackspace, like stated in the other answers.
(Which is the route I chose) Host your own Exchange server on AWS EC2 or Azure. Thanks to Microsoft License Mobility, you can install an Exchange license on a cloud server and provide email addresses for your customers` domains yourself. This will allow you to share the cost of the Exchange license between all your customers and if you reach the critical mass, this can save a lot compared to the pay-per-user-per-month models for most hosted solutions.
I am stil looking for a free alternative, but have yet to find one that can match the features that were available in the free version of Google Apps.
EDIT: I was thinking about this again last night and came up with another idea. I am not a Linux guy, so I would not be happy to do this for production mail server. For someone who is "bilingual" (i.e. ok with both MS and Linux solutions) or of a more adventurous nature than me, could take route 2 with a linux server and an open source mail server solution. I am sure this will lower the cost even more significantly, since you will not need to pay for the mail server licence and also per-hour instance costs for Linux servers are lower. This might even create a whole new revenue stream.
Zoho provides a Google Apps like deal for 5 users for free:
https://www.zoho.com/mail/zohomail-pricing.html
Up to five users
5GB/User
25MB attachment limit
Web access only
Email hosting for single domain
I just finished installing a mail server in Azure in a Linux virtual machine. So far seems ok.
The total cost of operation is about 10€ a month since neither Ubuntu (the OS) nor iredMail (the mail server) nor Postgres (the database) have any licensing fees.
Regarding the block on Azure IPs I do believe that most users saying that did not correctly configured their servers. And by that I mean that they didn't configured the PTR reverse DNS on Azure, which allows other mail servers to check if that IP is allowed to send and receive mail from that domain.
Also make sure you add the SPF DNS entry for your mail server. You can't blame a mail server to blacklist you if you don't minimize the risks of SPAM.
Hope this helped you.
Useful links:
IredMail Server - http://www.iredmail.org/
Reverse DNS in Azure - http://azure.microsoft.com/blog/2014/07/21/announcing-reverse-dns-for-azure-cloud-services/
First of all you need to identify how much and what all services do you need?
If it is just an IMAP/POP3 Email Box, then best option is a Virtual Server or Virtual Machine with cpanel, once installed with daily backup runs good for years, you get unlimited email accounts and unlimited space !!! You can increase your VM dynamically up when you need it. Drawback is, it takes little maintenance once in a while. But most likely cpanel auto update is very stable and I have VPS running for 5 years and every year we are just increasing our disk space.
If you want calendar along with live docs editing etc, then you have to go with Google Apps which is cheaper then MS Exchange. But if you need strict Exchange kind of services, then you will have to go with hosted Exchange.
I will not recommend spending money for Rackspace or any such Cloud Email which is priced per user, which is total waste of money as they do not offer anything apart from linux server with cpanel. Those services are only for non IT people. Since you have already asked question on Stack Overflow, you can easily setup and manage cpanel based linux OS.
you could run a Ubuntu VM in Azure and set up Postfix
You can install a Free Mail Server on a Virtual Machine on Azure like:
https://www.hmailserver.com/download
I have found the same problem myself.
The only alternative in the past would have been to use Google's equivalent service, but they have also stopped it.
Realistically, there isn't a free answer to using custom domains with emails that I am aware of. Both Microsoft and Google offer paid for services, but cost per user/mailbox, per-year - compared to their free services this is a big jump in price.
Google charge £33 per user/mailbox, per year.
Microsoft are slightly dearer at £39 per user/mailbox, per year, but include access to online versions of Office for each user too.
For my situation, the Microsoft route may be the better option, based on my customer preferences but I am sure that the Google service is equally adequate.
Hope this helps. (But let me know if you find a better alternative!!!)
How many real people do you have reading e-mail? As many as you got mailboxes? If not, then I really suggest you go for Exchange Online from Microsoft which goes for $4 per user (not mailbox) per month.
The trick is, that once you've set up your domains, you create a Shared Mailbox through PowerShell and while doing so, you give the real people (you pay for) the rights to read and send as. The cool thing is, that the user does not need to do anything. The mailbox simply appears in their Outlook.

Best Practice for Providing Email Account Information

I work for a company that builds embedded systems and we are currently developing a system for residential consumers, our primary focus until recently has been industrial and commercial applications.
One feature of this product is the ability for the device to send emails directly. The problem is the SMTP library is merely a client (as it should be) and thus requires configuring to connect to a mail server.
There is currently a debate going on as to whether we should be providing the mail server configuration information out of the box. At the moment the debate has split our team pretty much between the developers and management.
The developers think it will be too onerous for the "average" user to provide the FQDN or IP of the server, port, user, password and "from" address. Therefore, it would be preferable to only require the user's email address for the configuration to be complete.
Whereas management is worried about resource utilization (of course everyone is hoping for millions, or at least thousands, of users for our system!) and a "nefarious" user stealing the information we provide and using it for illicit purposes; while the developers don't think this is likely, as management pointed out, it would only take one spammer getting a hold of the account information and then we would be forced to shut it down for everyone.
The current compromise is to provide a unique email account for each device simple for relaying emails from our product to the user's email account. Obviously, this creates a management nightmare particularly because we are using a 3rd-party email hosting solution at the moment and can not automate the creation of these emails. Management does not like that fact that we have designed everything else to be automated and then throw in a nice big speed bump by manually creating each email account and then manually configuring each device to use this account.
Of course the developers suggested bring the email service in house but that creates other problems that we can not afford.
Which leads me to my question for the community, have you ever dealt with this problem? What solution did you decide upon? Why was that the best solution for you?
Since management is worried about a "nefarious" user free-riding your company's email service (besides that thought isn't that absurd) the only chance you have to not force people to go thru the hassle of configuration or to not burden you guys with manually creating accounts is to provide each client with a unique ID. This ID will allow you to shut down the service for the mallicous user.
One way to do this would be to configure each client to embed a unique ID in the header of every email. See this question. On the server side you would then have to implement a blacklist and check every email's header against it.
That's all, without further knowledge of your tech-stack it's impossible to provide a more detailed answer.

Preparation for building a e-news mail sending system?

Recently i decided to build this kind of web application. But i have got no experience for this.
So, to begin with,
Are those system using SMTP function and include those mail plugin such as PHPmailer??
Thanks
You have two options at your disposal.
Roll your own SMTP server + use a pre-built library relevant to your language/framework (PHPmailer)
Purchase the services of an email service provider
If you want to go with the second, you are giving up direct control so that you won't have to maintain an SMTP server, the emails will get into inboxes without question, and you'll get detailed statistics about what you are sending and what people are doing with it.
With the second option, you have two types: transactional and bulk.
Transactional Mail Providers:
PostageApp
Sendgrid
PostmarkApp
Bulk Mail Providers:
MailChimp
AWeber
Exact Target
Constant Contact
Take a look at your service and determine what sort of mail you will be sending (most likely bulk) and pick your provider based on the features you will be needing.
The correct answer is "propably", since you can't know about all systems. The easiest way to get answer is to look at similar OSS projects source code.

Send emails through VB6 if no email client

I have a VB6 app which is used by a large number of clients.
I need to allow the clients to be able to send emails to me. In the past I have done this using Microsoft MAPI controls. However, not all of them have an email client installed, since they use webmail instead.
Is there any other method anyone can recommend which would allow them to do this?
SMTP
You can use CDO for Windows to do this if we make a few assumptions:
Your users are all on Win2K or later.
The users will never be behind a firewall blocking SMTP or proxying all SMTP port use to a corporate server.
You have an SMTP server that you have an account you can let the user-mails be sent with.
You embed the server's address and account credentials in your program.
Sometimes using an SMTP server listening on an alternate port will address the second issue, but often such an alternate port is even more likely to be blocked.
SMTP is Dying
Abuse over time has made SMTP less and less viable for automated/assisted user contact. There are just too many variables involved in trying to open some sort of "clear channel" for SMTP communication as people work harder to fight spammers and such.
Today I would be much more likely to use either WebDAV or a Web Service for this. Both use HTTP/HTTPS which is more likely to get past firewalls and usually get by most proxy servers as well. WebDAV is often more "slippery" at this than Web Services, which more and more proxies are bocking. You can also use something more RESTful than SOAPy since the traffic "smells more like" user browsing to proxy servers.
WebDAV is a Clean Option
There are even free WebDAV providers offering 2GB of storage with a main and a guest user. The guest account can be given limited rights to various folders so some folders they might post your messages to, other folders they might get data from (read only folders), etc. For a paid account you can get more storage, additional users, etc.
This works well. You can even use the same hosting for program version files, new version code to be downloaded and installed, etc. All you need on your end is an aggregator program that scoops up user posted messages and deletes them using the main user/pw.
You still need to embed user credentials in your program, but it can be a simpler matter to change passwords over time. Just have the program fetch an info file with a new password and an effective date and have the program flip the "new" password to "current" once run on that date or after.
WebDAV support in Windows varies. From WinXP SP3 forward you can simply programmatically map a drive letter to a WebDAV share and then use regular file I/O statements against it, and unmap the letter when done. For more general use across even Win9x you can build a simple WebDAV client on top of XMLHTTPRequest or use a 3rd party library.
Web Services Have Higher Costs
Just to start with you have server-side code to write and maintain, and you have to use a specific kind of hosting. For example if you built it using PHP you need a PHP host, ASP an ASP host, ASP.Net an ASP.Net host, etc.
Web Services can also be more problematic in terms of versioning. If you later update your program to provide different information in these user contact posts you have to make another Web Service as well as changing both the application and the aggregator. Using WebDAV you can just make a "new format" folder on the server and have the new program post the data there in the new format. Your aggregator can simply pull from both folders and do any necessary reformatting into your new local database/message repository format.
This is merely an incremental additional effort though and a Web Service might be the way to go, even if it is just something written like an HTML Form GET/POST acceptor.
Although this question is for VBA you may find it of interest. Sending Emails using VBA without MAPI