I am trying to send a confirmation email to people who sign up at my site.
The problem is that the email is being sent from my default cpanel email account (which, according to Hostgator cannot be changed).
I have other email addresses set up in cpanel. Can't I send using one of them?
// ---------------- SEND MAIL FORM ----------------
// send e-mail to ...
$to=$user;
// Your subject
$subject="Confirmation link";
// From
$header="from: your name <your email>";
// Your message
$message="Your confirmation link \r\n";
$message.="Click on this link to activate your account \r\n";
$message.="http://mysite.co/confirmation.php?passkey=$confirm_code";
// send email
$sentmail = mail($to,$subject,$message,$header);