Question

I am working on a business marketing website. The criteria is that we have to send around 80,000 (say) newsletters per day to different email addresses. But my hosting company allowed me to send only 10,000 (say) emails from one IP per day. So to solve this issue my client provided me with 8 different IPs. I am having following questions:

  1. I don't know how to send each and every newsletter from different IPs, means first from first IP, second from second IP and so on?

  2. As I'm a PHP developer and not an expert at server end, can I accomplish this through my PHP script only or do I have to write a shell script to run at my server?

  3. Is there any algorithm to accomplish such type of problem?

Was it helpful?

Solution

Had similiar problem couple years ago. I resosolved it in simple way. Create table in SQL, or create a class and serialize it. Class or SQL have to contain mails addresses (if You have some kind of volatile content then also mail content), do a class to send mail in certain order, and do object of this class on each ip. That depends what kind of config You have on server. I had a easy way cause all of IPs had its own folder with content, so I just put there code to do object, and just redirected couple of times the website, since it had to be done by web. If You have can have it by CLI there is pretty chance that You could do it by include or similar.

This way is pretty lame, I know it, but didn't want to do something more sophisticated at that time. Later on I wrote a class to manage mail connections via SMTP, so I could chose with mail from witch account would be send. That is better way, but not all servers could support it.

Another way is to do a cron job and do baskets of mail to send portions over the time. (this way was most common on servers that I was repairing).

Another way is to do a bouncing effect on servers with IP. Probably You could do also some shell scripting and invoke it via php script.

Well, I think that there are better ways, but it really depends on server config.

PS. Forgotten to mention, that code can be invoked by AJAX.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top