The problem is most likely with your web host since the majority don't enable a domain specific email or SMTP for free account - that means they don't allow email sending via SMTP/mail() in php. This is typically done to deter spammers who will seek out free/cheap web hosts to do their bad deeds - if they have to pay for the SMTP service, they don't bother with that host.
I'd check with your web host first to see if you're setup with those features (you'll probably need to upgrade or pay for the extras as a bolt-on) and at the same time ask them to provide an example of a send mail script that works with their service.
For example - here is email sending code that works;
Code:
<?php
$from = "From: My Name <me@mywebsite.com>";
$to = "someone_else@theirwebsite.com";
$subject = "Hello";
$body = "TEST";
if(mail($to,$subject,$body,$from)) {
echo "Email sent OK";
} else {
echo "Email not sent - sending failed";
}
?>
The 'from' header should be an existing email account that is tied to your domain / created in your web hosting account.
The alternative is a to use a 3rd party event registration service hosted elsewhere.
Bookmarks