I'm in the process building a web application which is has a potential to send thousands of email on daily basis (most of it is system notification emails)
I'm using dedicated server for start but I'm thinking to use such as a smtp server to handle the sendmail process. Not just to reduce the server load but the most important thing is I don't wan't my server IP blacklisted in any spam list such as spamhaus.org
Can you suggest me what the best deal for this situation?
Options that I have so far are :
Using goggle app smtp with premier account. This is the option I prefered but I'm not sure whether google has such limitation that does not fit my situation
Using commercial smtp server (If this the best option, can you suggest me any reliable service for this?)
I would recommend a commercial solution because then your taken out of the maintenance and if you do get blacklisted you can enlist their support team to take care of it.
I've used campaign monitor and had very good success with them. The rates are comparable and the interface is very easy to use. This is more of a small business solution.
I've also used Responsys and Yesmail. These are more enterprise solutions and might be a little overkill for what your looking for.
Regarding black lists: if you are cautious, and do not do silly things, like sending 5000 mails once on a fresh IP address, than you will not be blacklisted. For the case of accidental blacklisting you should have a reserve IP address or a reserve server.
A few thousand mails is not a noticeable load on modern hardware. Just think about it: if you send 5000 mails per day that means only a single mail per 17 seconds.
That said I am not against using an external mail service for sending notifications at all, I just have no such experience.
Related
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Sending Bulk Emails using PHP
Is there a service out there that can handle sending emails constantly through PHP without issue? We're looking to send out 500+ emails a day or more and are worried about using the built in mail functions of PHP.
Any suggestions?
There's nothing inherently wrong with the built-in mail functions, and 500 e-mails a day is almost no load at all. PHP simply executes your configured MTA executable, such as sendmail.
However, I'd recommend using a better mail API such as Swiftmailer. This will enable you to build e-mails with HTML, attachments, and such much easier than trying to generate your own MIME messages.
For larger mail volumes, I would recommend using a 3rd party, such as MailChimp (or one of the many, many others). They're very good at keeping you off blacklists for spam and such.
500 emails/day really isn't that many. You have several options:
Send the mail yourself, from your server. You could use third party libraries to handle the multitude of options. Swiftmailer, PHPMailer etc or roll your own. Sending from your own servers, you will need to manage reverse DNS, SPF records etc and (assuming you're on Linux) will become quite well acquainted with Postfix et al.
Optionally you can use third-party services, such as http://sendgrid.com/ or http://aws.amazon.com/ses/. These are essentially pay-as-you-go mail servers with nice simple APIs. This can help with a lot of the heavy lifting involved in maintaining reliable mail servers. This gets complicated when you're sending thousands of emails per day. Throttling, queueing, load balancing etc.
Another option, if you're doing eMarketing is to use a service such as Mailchimp or Campaign Monitor. These will do all proofing, sending, throttling and reporting for you for a one-time fee.
you can use php's mail() function without any issue. but most of the shared hosting servers do not allow you send large volume emails.. You can use third party SMTP for this..
I am developing a social networking site. It has functionality like user registration, people exchanging messages and sending email notifications for people's actions (and many more).
Currently I use PHP's mail function to send mails and it is working fine. I already set up a VPS and hosted the application.
My question may be a dumb question. Do Facebook and other social networking sites use SMTP servers to send the notifications or only just any kind of PHP mail function?
I read somewhere that using PHP's mail, there is a chance of mail going to SPAM folder. They advised using a certified SMTP server.
So, if I have to use an SMTP server:
1) Do I have to purchase a certified SMTP server separately? Or can this be hosted on same VPS whatever I have. If so, what server software will be good for this?
2) Are there settings I have to do in SMTP servers like send unlimited messages, because we don't know how many people exchange emails in a minute, and that is totally random.
To start: you are definitely going to have to use an SMTP server to send the emails from PHP. You can't simply throw your emails at the mail() function and expect it to work. You have to connect it to an SMTP server that does all of the dirty work.
However, if it's not your domain, I would suggest you don't do it. If you have the time to learn the ins and outs of email delivery and want to set up and maintain an SMTP server, by all means, go ahead.
If you'd rather focus on building your app and not worry about your emails getting delivered, I'd suggest an email delivery service. Here's a good list of services to check out:
PostageApp
Sendgrid
Postmark
Mailjet
And there are plenty more out there. All of them have a free option for you to play around with, so just look for the one that fits your needs and requirements.
(FULL DISCLOSURE: I am the Product Manager of PostageApp. Happy to answer any questions you might have about sending email from your app, though!)
The issue here is not really with the mail() function in itself, but in how you construct the emails. Messages can be treated as spam for a million and one reasons, but it is generally accepted that if you use one of the tried and tested mailer libraries, like Swiftmailer or PHPMailer (both free) there is marginally less chance of your messages being treated as spam.
Whether your messages get treated as spam is far more about how you construct your messages than how you send them. Another major factor is if your server sends thousands and thousands of emails all the time, so another hint is to be sparing with the emails you send out - only send them when you actually need to.
If you really want to know the answer to this question, you should do some reading on exactly how the modern email system works. Being able to build and send good emails is all about knowing how to work the system. Start here.
i need to send bulk mail in my php application, but its outgoing limit was 500, if i purchase VPS server for sending email if it grows more than 1000+ gmail /hotmail will mark me as a spam , so what is the solution for this issue?
{ purchasing api from mass providers is not under my budget }
If you think your mail is not spam and your mail server is not setup as a relay to others, then it is ok to go with a VPS server for the purpose.
In my case, I keep sending alerts to my customers on different conditions. The emails may amount to about 10000 a day. But I hear that these are blocked only in rare occasions and we ask the customers to add our from email to their address books and it becomes good after that.
If your mail is not SPAM then you should be be able to deliver it, with some effort. Read for example Gmail Bulk Senders Guidelines.
One consideration is that you should not start with sending thousands of mails to gmail or any other mail provider. If their system does not know your server (specifically the IP address of your SMTP server), then it will block you. Start sending a few mails per day, and gradually increase the count.
I think VPS is only usable if you get your own dedicated IP address. Otherwise I would rent a dedicated server.
I can suggest you an idea,which might sound WIERD !!!! and might lead you to pull hairs.
Search for peter bromberg article in egghead cafe on Asynchronous Mail sending technique. Search on google if you can send messages from multiple account via single app. For example if your target for the day is 10000 mails, and per day limit for any common email id (or free version or lite version of any bulk mailing) is say 500 then create an array of your email and assign them mail sending responsibility as per their limits. try to achieve this via your programming skills.
This is the only way i can suggest you in a very cost effective manner. But again you need minimum of 10-15 email ids for it, which is a biggest drawback of these approach.And you might need to create more 10-15 emails, if the earlier ones get blocked by your Service Provider or receivers SP.
I have a website that receives incoming emails via cloudmailin, adds the content to the database, and then sends a confirmation email back to the person who sent the email. Currently I'm using a php mail() function to send the reply, but it seems to take about 1.5 min to actually get to the user's inbox. Is there a way to make this more instantaneous? I'm currenly hosting the application on FatCow, and I'm sure it has to do with their mail server, but I don't really know much about how that works and am wondering if I have to change hosts to accomplish faster delivery times or if I can do anything about it without switching.
mail() is a black box. You're telling PHP to try sending a mail however the host has configured PHP to do so.
It's very likely that it's just calling sendmail in your case. It's also very likely that the mail queue on that machine isn't the fastest in the world. Shared hosting machines are often overloaded.
The very first thing you should do is ask your host about the mail delay. Perhaps something is wrong, and they can fix it. Or they might just tell you that a minute and a half is not a long time to wait.
There are lots of other options, mostly in the form of companies that provide an SMTP service to you. I can't recommend one, but I can recommend that you pop over to your favorite search engine and look for "smtp service." I've recently starting working with Amazon Simple Email Service. It's supposed to be fast and well-maintained, and it's certainly inexpensive.
All of those options are likely going to require some configuration changes on your end. For example, you'll want to set up custom DNS records (for DKIM and SPF) to ensure that mail from a third party provider isn't automatically flagged as spam.
Using SMTP with PHP is dead easy. There are plenty of mail generating options out there. My personal favorite is SwiftMailer. It even has a transport option for Amazon SES.
The final option, of course, is grabbing your own virtual private server or dedicated server, which will let you configure outgoing mail as you desire, at the cost of needing to know how to maintain that server.
Edit: Obligatory link to relevant Coding Horror post.
I have a client that I'm wanting to move to a virtual private server. I'm trying to keep his server as simple as possible, not even having an email server on there (or at least that is the plan). The reason being I've read that email servers are complex to setup and take up alot of resources. I'm not sure what to do here.
He has a newsletter that he sends out to almost 75,000 people. Currently on his shared hosting there is a cron job that calls a script that sends out a 100 emails at a time (to keep within the limits of the host). I'm curious to know if the same thing is possible to do but with using his his Google Apps email account? Effectively logging in and sending the email from there? I can't seem to contact Google about this and it doesn't seem to be in their help section.
Is it possible? Would it be wrong to do? My client has looked at many of the mail out things out there (MailChimp, etc) but they are very expensive for what they are. Especially as what he has now does work. Thing is, I'm implementing the whole thing new on a VPS and so am looking at options.
UPDATE: It seems that the Google option just isn't an option (I'm not surprised by this at all). May I ask which minimal email server could be set up on Ubuntu 10.04 LTS which would allow me to continue the cron approach I had before on the shared server that will allow sending the emails out? (I will still continue to use MX records to Google for the actual emails the client will be using)
UPDATE: A friend of mine went to a mini Django convension in London the other week and there was guy who runs Mixcloud. He said he uses Google App Engine to send emails, so it's totally scalable. There is Google App Engine code up on Github here: http://github.com/tow/appengine-mailer and this seems to make sending email very easy from Django, from a command-line (so could use with PHP) etc. Looks like a very good option and cheap too! What do you guys reckon?
UPDATE: I've started a new question to make it more refined and clear to hopefully help others who maybe having this problem: Effectively using Google App Engine to send lots of emails using PHP?
There is a limit of how many emails can be sent per day through the google apps accounts. The limit is waaay below 75k I think it is 2k per mailbox if he has the premier account.
Two options here. Sign up with a company that does this for him: Constant Contact, Mail Chimp, ...etc. Or install an SMTP server and have it go out how it did before. The performance hit the server will depend on what mail server you choose and how much load is being placed on it.
UPDATE: I primarily work with windows servers so my experience is there (setting up secure SMTP in windows is pretty easy). Googled around and found this page on Ubuntu's site. It has a bunch of options for doing this: https://help.ubuntu.com/community/MailServer . From that page you should only need the Mail Transfer Agent and possibly the Mailing Lists components. Also make sure to set up your SPF records correctly and identify this server's IP as an outgoing only server. It can also help to set up the server with an MX record with a priority higher than your other MX records. If google goes down incomming mail will try to go to your VPS but as long as you don't set it up to receive mail, just send it, it will bounce the request. Which would happen anyway if your google mail servers go down so nothing lost.
Lastly you can try to register your server's IP with yahoo as a bulk mailer.
UPDATE2: Also make sure to have the "FROM" address in the newsletter be a valid email address from a valid domain. This will help immensely with deliverability.
UPDATE3: Can you get a static IP with a APP Engine Account? If you can't get an IP (preferrably dedicated) assigned to you then your deliverability will be horrible and you will get blacklisted. IF you can get a static IP assigned to your App Engine account you can set it up in your SPF records and that solution should work.
I did this a while ago for a commercial website. To describe it as an utter ball-ache would be an understatement. The amount of man-hours we sent working with our mails, enabling the various headers to avoid it being flagged as spam, to ensure that it looked to ISPs as valid mail etc was far greater than anyone envisaged at the start of the project. Then there are issues with mail throttling and throughput - at one point we were sending a weekly mailout that took 8 days to go through the entire mailing list.....with obvious results.
Anyways, upshot is, outsource it - there are many companies out there who have already solved this problem for you - granted you have to pay for them, but its cheaper in the long run.
You should use a third party site to fulfill this clients requirements. There are lots of technical, legal, and spam issues that need to be overcome to ensure that your client is not blacklisted or fined.
A company like Industry Mailout, MailChimp, or Campaign Monitor will send your mail for you, and is often a lot cheaper than trying to do it all yourself. :D
Plus these companies offer useful analytics to make your campaign's better.