|
Posted by ctclibby on 12/17/17 11:49
Chris wrote:
[snip]
> Trying a real simple example like this...
>
> <? phpinfo();
> mail('mail@myaddress.com','test','message'); ?>
Hi Chris.
I had problems with this also. Don't know if my solution will work or
not, but. Here is the code I used. Note that it is pieces of stuff
that I played with until it worked. Your mileage may vary.
<?php
include("DB.php");
.....
$MailTo = 'emailname@domainname.tld';
$Subject = 'Some subject here';
$MailBody = 'What ever is the text you wish to send';
$headers = "From: me@mydomain.tld";
.....
?>
I fussed with this for a few hours until I found that 'header' stuff.
I then wrapped it in an 'if' statement.
if(mail($MailTo, $Subject, $MailBody, $headers) ) {
do something here.
} else {
oooops. do something drastic here
}
Hope that helps
todh
Oh FC5, php 5.14, sendmail 8.13.latest
Navigation:
[Reply to this message]
|