views:

751

answers:

2

Well, so far, I have been using php built in function, mail(), and I have no problems with it, even I sent a blast to 1000+ users. But then, lately I found this phpmailer, which is specially design to send email.

Q1: Should I change to this phpmailer?

Q2: What are the advantages of using phpmailer?

Q3: I found other products on phpmailer website, i.e phpmailer FE, ML etc. What are those? Which one you guys is using?

Q4: Have anyone tried sending blast email to 2000+ users with phpmailer? If yes, does it cause any problems?

Thanks in advanced for answering the questions

+2  A: 

Q1: You should definitely switch away from using mail()

Q2: mail() function is really, really for simple stuff. Mail libraries hide a lot of low level stuff from the user, and offer simple ways to make HTML emails, embedded images in mail, etc.

Instead of phpmailer I'd recommend SwiftMailer

  • Send emails using SMTP, sendmail, postfix or a custom Transport implementation of your own
  • Support servers that require username & password and/or encryption
  • Protect from header injection attacks without stripping request data content
  • Send MIME compliant HTML/multipart emails
  • Use event-driven plugins to customize the library
  • Handle large attachments and inline/embedded images with low memory use

I've used SwiftMailer to send 15000+ mails, but as you'll find in SwiftMailer documentation, its recommended to send mails in smaller batches (depends on you server ex. 100, 200, 500 per batch), using cron.

Željko Živković
can the swifthMailer hanlde bounce mails? This is important to me..
bbtang
Depends on when and where the "bounce" occurs. If the MTA your swiftmailer is connected to rejects an address, yes, you can detect that. see http://swiftmailer.org/docs/finding-failures
VolkerK
+1 for "not using mail function and using an existing class" : existing class will already do most of the work, and will be much more tested than any code you could write => big win !
Pascal MARTIN
As VolkerK said if your server rejects the address you can detect that, but to detect mails that were bounced by some other server, you need to set the return address for your mail. see http://swiftmailer.org/wikidocs/v3/sending/bounce_address
Željko Živković
I see. Well, looks like there is no phpmailer supporter here, isnt it? I will definitely take a good look at the swiftmailer, thanks :)
bbtang
A: 

Hi,

@Željko Živković : Can i know how you have avoided mail sent as from spam? I'm using phpmailer to send mail through my website and most of them are being received as spam in yahoo and hotmail

thanks

praveen
I answered a similar question here: http://stackoverflow.com/questions/2584799/sending-solicited-mass-email/2584893#2584893
amphetamachine