Need advice for mass mailer in Delphi
I'm trying to develop a mass mailing application and would like to use Delphi for it. What components or libraries would be my best options (for Delphi7). Can they handle sending about 25,000 emails? The application is not for spam开发者_如何学编程ming, so I'm curious if correctly authenticating and playing by the rules will add some delay to the process?
I'd use the Indy components, which are in the box. Newer versions will let you also send to gmail and other servers under SSL.
They can handle even complex situations, they limitations are likely in the SMTP server you'll use for sending. They generally have significant restrictions, but they tend to be all different.
The problem with mass mailing is not so much your program, but it is the limits that your ISP will allow.
Many ISPs severely restrict you and will not allow more than a set quota per hour, day or month that is usually quite low, e.g. 200 emails per day. Penalties are severe, and they can suspend your account without giving you a warning first.
If you (or the people using your program) want to send out 25,000 emails or so within a reasonable time, say a few hours, you will need either a dedicated email server, or need to use the services of a high volume SMTP service.
Also make sure you research into Throttling and Batching your emails.
First of all I agree with the answers marco.cantu and lkessler have given you.
If you want a higher level abstraction in a component, I have such a component available. You can find it here: RoboMailer
It can do mass mailing and also can personalize mails with additional data. It was designed for tasks just like this. I use it in a big product that sends out a lot of mails daily (surveying system with invitaion system on top). The component simplifies the task of mail sending so you don't have to worry about the pitfalls of mail composition etc... It is also equally simple to send 1 or 20.000 mails. The Demo is inlcuded. In fact the demo itself is a fully functional mass mailer :)
But it is based on ICS (Internet Component Suite), so you have to use ICS with it.
For simple internet applications I have found that Synapse library is very good. It can talk with TLS/SSL protected POP3 & SMTP while Indy cannot without paid libraries (at least from Turbo Delphi). It work very well with command line, formless applications that you can compile using Delphi, Kylix or FPC. Look at their HOWTO for examples with mail protocols.
精彩评论