View Single Post
Old 07-25-2013, 01:41 PM  
alcstrategy
Confirmed User
 
Industry Role:
Join Date: May 2012
Posts: 124
Overall without any debugging at all you will not know the exact problem - it could be a number of things.

Using mail may not be simpler if the code problems lie in the database perhaps wrong formatted to address, etc. So your mail code could be fine, but because of something else it isn't working, so changing to mail would make no difference. I don't think there's anything wrong with using pear in your case, I personally dislike it but its just a matter of preference.

Also you want to send mail in batch but the problem with using mail function is that its inefficient in a loop, pear is actually more appropriate usage. Granted you may not have 100k users, but that isn't the point.

I recommended that library because it will simplify things for you and also be efficient. The docs might also help explain things better for you to give you a better understanding in general. Again, I personally dislike pear. It's just a matter of preference

Also if you wanted to add attachments or something it would be a pain in your ass using mail function.

Also your code has efficiency issues and also security issues. You should also try to read about prepared statements

Either way don't let people on a board tell you workarounds or cutting corners for things especially if you don't know better and are just learning. If you know why you are cutting corners then it's fine, but if you do it just blindly then you will never learn "proper"
alcstrategy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote