Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
I know that PHP makes sending emails very easy, but for some reason when I try to use code that sends an email the page freezes when loading. I'm currently testing the php code on my localhost, and I'm using Apache. I was wondering if this setup doesn't allow sending email or if there is a way to set it up for sending email. BTW - if it makes any difference, here is the code I'm using:Code: Select all
<?php
$to = "nastybuttr@hotmail.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
$header = 'From: nastybuttr@hotmail.com';
if (mail($to, $subject, $body, $header))
{
echo("<p>Message successfully sent!</p>");
}
else
{
echo("<p>Message delivery failed...</p>");
}
?>feyd | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]