Implement my own Email server in my machine - windows-7

I'm very new to Email server config field.
I have 10 000 Email address in my database. My only requirement is send a mail to each and every email address. But I do not need to receive any mail(not need static IP). I know it is not possible with common mails like Gmail or hotmail. How can I do it ?
I have tried SMTP. Installed IIS 7. When I going to config the SMTP it ask a email address. I believe that it is act as a client and foreword mails to real Email server.
How can I implement my own Email server in my machine ? Or if I use Linux kernel how the things happening ?
please help me.

Well... we're talking about sending a mailing, right? :]
Hey, it's 2012, where in the middle of SPAM war! I'm more than 100% sure that you'll waste lot of time and end up with noting or with your e-mail account blocked by your ISP for sending out e-mail. Because you will have to use your existing SMTP server / account for encrypted sendout or your own, local server will only be able to use port 25, which is blocked on most destination servers.
Want to know the best solution? Find any site (like freelancer.com), where you can offer a one-time job of sending your e-mail do these recipients and pay for it. This is the simplest, fastest and low-nervous way. And it should be fairly cheap for only 10k addresses (I found some Hindi company on freelancer, where I paid 10$ (ten bucks!) for a mailing to 500k+ addresses, though quality and time of doing this job was really poor).
I had the very same issue. I wasted few hours for trying to setup own mail server or use some specific mailing piece of software. I considered many solutions, waste too much time and ended up getting someone from freelancer.com to do the job for me and paid for it.
You can also consider a professional mail sending service, like for example MailChimp.
MailChimp allows you to send up to 12 000 e-mail per month absolutely free (as a demo of their paid services). But since you can have only 2k addresses in your address book per once, you would have to split your 10k database into five parts and send out whole mailing in five days long period. But still, free.

Related

Which SMTP sever to send Java Mail to when the server is cloud-based?

Java 8 here, although this really is more of a generic Exchange/SMTP question I suppose.
I purchased a domain name and Office 365 support from GoDaddy, and as a result, have several email addresses through them. Let's say one of these is support#myapp.example.com.
I am writing a Java 8 app that will allow users to send emails to this support address (through the app). I will likely use the excellent Simple Java Mail library, which wraps the Java Mail API. And so somewhere in my app there will be some code that looks something like:
Email email = EmailBuilder.startingBlank()
.to("MyApp Help Desk", "support#myapp.example.com")
.withSubject("Support Ticket #12345")
.withPlainText("Something went wrong inside the MyApp!")
.buildEmail();
Mailer mailer = MailerBuilder
.withSMTPServer("smtp.host.com", 587, "user#host.com", "password")
.withTransportStrategy(TransportStrategy.SMTP_TLS)
.withProperty("mail.smtp.sendpartial", true)
.buildMailer();
mailer.sendMail(email);
Pretty straight-forward stuff, right? Except I'm confused about one simple thing: which SMTP server am I using here? Would I use the Microsoft Exchange server that my GoDaddy account provides me, or would I choose something else?
That depends a little bit on what you want to do.
If you just want to make one attempt to send the mail, you connect to the mail server that accepts mail for support#myapp.example.com. It sounds like this is an office365 server owned by Microsoft that accepts mail for myapp.example.com. There should be public DNS records for that domain. I haven't used the Simple Java Mail library, but from your pseudocode, I assume it does the DNS lookups for you.
It sometimes happens that an application encounters errors when trying to send an email. For example, somebody could restart your app server in the middle of the smtp conversation, or reboot your router, or something else. It's pretty common to use a Mail Transfer Agent (MTA) such as Exchange to help make this process more robust. If the MTA fails on the first delivery attempt, it will retry delivery for some configurable period of time. In your case, you could send the email to your Exchange server, and it would route the email to myapp.example.com.
(In this case, Exchange is sort of acting as a Mail Submission Agent (MSA), but that's kind of a nitpick.)
Hope this helps.

hMailServer only replies on first time

I've just installed hmail on Windows 2012 to self host a mail server. Opened the ports (25, 143 - SMTP, IMAP). Setup auto reply on some test accounts on domain.
I have a strange experience: The first emails I send to the new inboxes from my gmail account get auto-replied. Thereafter any more emails sent are largely not replied (i.e. mostly not replied but occassionaly very late). The hMailServer logs show it found the emails and sending the replies. I tried with my work email account to the new hMailServer inboxes and its the same situation.
I've checked the spam and they only occasionally go in there depending on the auto reply message body. Reverse DNS has been setup by my cloud instance provider.
Not sure whats going on but the hMailServer diagnosis does show red lights against MX records not being found local and internet domains (although internet MX route checking sites give it a green light when checking).
Why is it only sending out first time and then less likely other times.
Ok its because the autoreply function only sends auto replies once per email address. I ended up applying a 'rule' instead to reply and delete the incoming the message to reach the desired behaviour.
The autoreply feature only ONCE per email address PER SESSION. That is to say, when hmailserver (service) is stopped and restarted the cache is cleared and so the first occurrence of the autoreply already sent is forgotten. (Note: it also doesnt autoreply to 'auto-reply' emails as this could cause looping)

How Can achieve delivery failure notice mail using Spring JavMail?

I am using Spring JavaMail for my Email communication application. How Can achieve the functionality that when a email delivery fails due the reason of wrong email address?
Achieving this reliably is not trivial. The protocol specs for SMTP in RFC 821 specifies a number of return codes. Notably 550 is what an SMTP server should return when attempting to send an email to a nonexistent address. I say should because most public-facing SMTP servers won't do this - they either quietly accepts the message and then drops it or, if they are a little more good-mannered, accepts the message but sends a "delivery failed" notice back to the sender ("from" address). Public services like MSN and Gmail will also blacklist senders if they send enough emails to non-existing addresses to prevent spam.
The reason for this is to prevent email-fishing and spamming.
So what you can do is to
Check for SendFailedException in your code. This will only work for servers that follow the SMTP specifications and actually send an error code back. Like I said, very few public servers actually do this.
Set up a proper mailbox for the address you use as sender and monitor that inbox for delivery failed notices. Note thought that these need not follow any common pattern, which is why this is non-trivial.
For the email servers that doesn't give any notice, you really have no way of knowing.
This is one of the reasons why companies buy mass emailing services from dedicated providers, since they have all these things already built to measure bounce-rate etc. But even with those, it's never going to be 100% accurate.
These FAQ entries might help as well:
If I send a message to a bad address, why don't I get a SendFailedException or TransportEvent indicating that the address is bad?
When a message can't be delivered, a failure message is returned. How can I detect these "bounced" messages?

I can't add the last Google Apps Email MX record because Zerigo DNS only allows 10 records. Will it matter?

I am using Heroku for my site hosting, and Zerigo for DNS magagement. I'm trying to setup Google Apps email, but I can't add the last MX record (ASPMX5.GOOGLEMAIL.COM.) because I have hit my limit of 10 allowed total records on Zerigo. Will it matter if I don't add this last record?
No it won't. Google Apps gives you that many MX servers for heavy redundancy in case of problems. MX records have a server to send attempt to send mail to and a priority associated with it (IE which server are you in line to receive mail for this domain if the other isn't available). You weren't able to add the lowest priority server to your DNS. Normally no mail server would attempt to connect to it (aspmx5.googlemail.com) unless all the others were unavailable. In an instance like that we'd probably have bigger problems to worry about :)
It's very unlikely that it will matter. Each DNS record is given a priority, so whenever an email server is resolving that domain name, it will go through each record, order by priority in ascending order, until it finds one that resolves.
Google's servers are very stable, so if they're to the point that 9 previous records are failing, chances are good that it's catastrophic and your email will be down regardless of DNS.
tl;dr: you're fine

Receive SMS messages by web application

We are building a web app that should be able to receive SMS messages and store the information contained in it in database.
Which methods have you used? Which service providers are out there that can assist?
http://www.clickatell.com/ are massive and it works exactly like it says on the tin. You pay for a phone number and sms messages sent to that end up hitting a URL on your site to deliver them just like someone posting a form.
I'd recommend using a service such as TextMarks. TextMarks is free, and lets you pick a keyword for your service that allows users to route messages to you through TextMarks' shared short code, 41411. The only catch here is that they reserve 20 characters in each message for short advertisements to pay for their services.
If you ever outgrow their ad-sponsored services, you can upgrade to a premium version that doesn't include ads.
Another (cheaper) alternative is to have your users send text messages to an email address like sms#yourapp.com. Then you can have a background thread that's looking at the email account and puts the messages into the database.
I've implemented and tested this approach with major US carriers with everything from smart phones to pay-as-you-go "crappy" phones without a hitch.
When the user sends the SMS to your email address you get the SMS email gateway address (e.g. 8055551234#vtext.net) so you can send response messages.
The only downside is that it's a bit more difficult to find the "send to email address" options on most phones, but it is (basically) free for you. This is especially helpful for reducing costs while testing out workflows. Those ~3 cents for each SMS add up pretty quickly, especially during automated testing.
When you want to support SMS numbers you can configure most SMS gateways to send an email to an address, so you won't have to change your infrastructure to support a "real" SMS messages.
I haven't done it yet, but I guess you could also setup an Asterisk system on your server, then get a regular VOIP acccount (which Asterisk hooks into) and configure the Asterisk server to forward all SMS to your application. This article might help setting up the Asterisk server.
I've had experience using MX Telecom as an SMS Gateway. Essentially they posted data to our web service every time we received an incoming SMS. The application in question was also sending SMS messages as well and we just did an http GET to a web page of theirs.
I can't speak to the business end (i.e. cost), as I was just in charge of implementing the features - but working with an SMS gateway is really very simple from a development perspective.
+1 on sebastian i was jsut writting pretty much the same
if you are working with ruby you might want to have a look at adhearsion
You can use SMS gateway software which will receive SMS messages through a GSM modem or 3G dongle connected to a PC and POST them to your website via HTTP. Eg: this software

Resources