Click to See Complete Forum and Search --> : Problem sending mail()
I'm having problem with sending mail with mail() function.
I have setup the
smtp and sendmail_from variable at php.ini file.
I also Ping my mail server to make sure that it's working and it does.
Strangely it still not working.
I'm using NT server and IIS
Does anyone know if there is anything that I miss in order to setup send mail properly?
here are my codes:
<?php
$to = "rivaisalim@hotmail.com";
$subject = "Mail test";
$header = "From: z1gma@hotmail.com";
$body = "Hello there can you receive my mail?";
$success = mail ($to, $subject, $body, $header);
if ($success)
{
echo ("<br><b>Email Sent to $to!</b><br>\n");
}
else
{
echo ("<br><b>Email Can't be sent to $to!</b><br>\n");
}
?>
I have tested my code at free web that support php and it works but it's not working at my local NT server with IIS
It give the following error for me:
Warning: Unknown error in C:\...\email.php on line 7
$success = mail("$to", "$subject", "$body", "$header");
Please place the double code aroung your variables(specialy in NT environment) and see this will work.
I am working in php. Recently I face a problem while try to do the coding for printing.
I want to create a print function in php which allow the user to print the page display on the broweser, on a button click.
If any one know reply me as quick as possible.
Thanking you.
partha.
hi php experts
iam also facing the same problem
as like partha .please help me any php experts help me .
Below this given ,printable format
iam in enthu to know how they are printing
the page .after clicking the page, the left
side is gone only text is there .so please help me in urgent
regards
frank
Hi Partha,
i think you just need this script :
<a href="javascript:window.print()">print this page </a>
put that script on the page and try to click the href.
you also can use the picture or button.
PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved.