Re: FN-FORUM: Emailing from PHP
date posted 14th June 2003 16:20
> what is the best thing to use for Emailing from PHP. I have used ASPEMAIL,
> JMAIl and CDONTS from ASP but I don't know what the usual one is from php -
> I expect there a several.
Pam, PHP has various built-in mail functions which are more than
adequate if you just need to send a confirmation message etc.
Have a look at "mail()" in the documentation, but basically you can do
something like:
$mailTo = [EMAIL REMOVED]
$mailSubject = "Look, an email";
$mailBody = "Hi People\n\nI'm a cute little email, so I am";
mail($mailTo, $mailSubject, $mailBody);
You can optionally add a bunch of headers in as a fourth parameter to
set the From address, CC, BCC etc. - it's all in the help for the
mail() function.
Cheers,
Pete
--
Peter Croft
PC Associates