Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #14151
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: sending pdf files to individual email... |
| Date | 2014-07-29 20:40 +0200 |
| Organization | PointedEars Software (PES) |
| Message-ID | <2322489.l0nUaAXmaq@PointedEars.de> (permalink) |
| References | <80518368-4133-4211-9d51-4949a5799d06@googlegroups.com> <0.c785a44165ca78df9327.20140729114034BST.87ha2030ta.fsf@bsb.me.uk> <lr881l$ovj$1@dont-email.me> <0.cb7ec34f1f7a3ac6698c.20140729183132BST.87mwbscbrf.fsf@bsb.me.uk> |
Ben Bacarisse wrote: > Jerry Stuckle <jstucklex@attglobal.net> writes: >> On 7/29/2014 6:40 AM, Ben Bacarisse wrote: >>> nag <visitnag@gmail.com> writes: >>> <snip> >>>> I have a text file with employee_number and employee_name and >>>> employee_email id delimited with comma. >>>> >>>> i have uploaded it into a mysql table called empDetails. >>> >>> That may not be the best thing to do. For example, if the definitive >>> source of the data is somewhere else and it's been exported to you to >>> do this task, putting it into a DB just complicates the process and adds >>> another point of failure. It does not make the task any easier. >>> >>> (Of course, there are lots of cases when it *is* the right thing to do >>> -- it's impossible to say from what you've said.) >> >> Actually, I think it's a pretty logical thing to do. Retrieving data >> from a SQL database is easier than a .csv file. > > I'd say they are pretty much the same, with the DB being a tad more > fussy if it needs authentication. But I was talking about the work > flow. I was saying that fopen and an fgetcsv loop is easier than the > import *plus* the read from DB. You have to deal with several delimiters and escape sequences in a CSV, but not in a database. A proper database does not have have empty lines/rows, which fgetcsv() cannot deal with properly (so you need a gauntlet there). A good database format has character encoding information attached to the database, tables and columns, a CSV has not (which manifests itself strongly if you open UTF-8 CSVs in Excel from Windows Explorer). A database table column has a type; a CSV has only strings and you need to convert them. It takes only one function/method call to slurp a whole database table into an associative array or an array of objects, several to do that with a CSV. So I fail to see how CSVs could be easier to process with PHP than a database query result. Parsing CSVs sometimes is a necessary evil (when people would not give you access to their database, or you cannot migrate directly), not something that should be made everyday practice. > <snip> >>> [1] http://pear.php.net/package/Mail_Mime >>> [1] http://pear.php.net/package/Mail >> >> Pear's Mail package hasn't been updated in over 4 years and looks to >> have been abandoned. <https://github.com/pear/Mail> was last updated 4 _months_ ago. However, if you cared to visit the site, you would have seen that Mail_Mime, which matters here, is much more actively developed: “1.8.9 (stable) was released on 2014-05-14”. And then there is Mail2. >> I find PHPMailer to be much superior. I would not debate that at this time. >> It's available on GitHub. So are PEAR packages: <http://blog.pear.php.net/2012/01/24/what-would-you-do-with-5-million-lines-of-code/> > That looks very good. > > I'd always assumed (without any justification) that it was the PHP > equivalent of CTAN for TeX or Hackage for Haskell -- that most of the > good stuff would eventually end up there (with some bad stuff that needs > to be filtered out). Maybe PEAR is administered in some why that puts > people off, or maybe PHPMailer is a lone example? They could do a much better job of pointing out that development is going on on GitHub now. It is hard to find even a link to the PEAR git repository on pear.php.net. And that double maintenance should cease, too. Maybe it is an issue of manpower, misorganized personal resources? -- PointedEars Zend Certified PHP Engineer Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
sending pdf files to individual email... nag <visitnag@gmail.com> - 2014-07-28 22:31 -0700
Re: sending pdf files to individual email... "J.O. Aho" <user@example.net> - 2014-07-29 09:34 +0200
Re: sending pdf files to individual email... Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-07-29 11:40 +0100
Re: sending pdf files to individual email... Jerry Stuckle <jstucklex@attglobal.net> - 2014-07-29 09:36 -0400
Re: sending pdf files to individual email... Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-07-29 18:31 +0100
Re: sending pdf files to individual email... Jerry Stuckle <jstucklex@attglobal.net> - 2014-07-29 14:19 -0400
Re: sending pdf files to individual email... Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-07-29 20:40 +0200
Re: sending pdf files to individual email... Luuk <luuk@invalid.lan> - 2014-07-30 20:26 +0200
Re: sending pdf files to individual email... Denis McMahon <denismfmcmahon@gmail.com> - 2014-07-29 19:53 +0000
Re: sending pdf files to individual email... Denis McMahon <denismfmcmahon@gmail.com> - 2014-07-29 19:50 +0000
Re: sending pdf files to individual email... Derek Turner <frderek@cesmail.net> - 2014-07-29 11:11 +0000
Re: sending pdf files to individual email... nag <visitnag@gmail.com> - 2014-08-19 07:20 -0700
Re: sending pdf files to individual email... Jerry Stuckle <jstucklex@attglobal.net> - 2014-08-19 11:42 -0400
Re: sending pdf files to individual email... Michael Vilain <vilain@NOspamcop.net> - 2014-08-22 22:46 -0700
csiph-web