Re: stumped-mail and database
| From: | Jochem Maas | Date: | Mon, 06 Dec 2004 19:10:51 +0000 |
| Subject: | Re: stumped-mail and database | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-37616@lists.php.net to get a copy of this message | ||
er, I don't know if it would interest you but here is a class I have been using for ages now (not that I have trouble using mail() for simple jobs) because its simple, packed with functionality and works well:
http://phpmailer.sourceforge.net/
the following page hopefully demonstrates how simple it is to setup/use:
http://phpmailer.sourceforge.net/extending.html
Norland, Martin wrote:
-----Original Message-----...
1) change $to = "$rsVendorJobs->Fields('Conmail')";I suspect that $to would contain something like: (Object) ->Fields('Conmail') or something even more garbage like (i.e. ), 'complex' $variables in doubled quotes strings should always be wrapped in curly braces, if only for clarities sake (if you want to know exactly when they are required then RTFM ;-).
To $to = "{$rsVendorJobs->Fields('Conmail')}"; Or just $to = $rsVendorJobs->Fields('Conmail');this is the best way - saves some string interpolation.
2) change $body = '$cl'; To $body = $cl; 3) from mail() docs [this is just for reference, since you're only sending one header it's probably not a problem] "Note: You must use \r\n to separate headers, although some Unix mail transfer agents may work with just a single newline (\n)." Then we'll see where you are from there...