I just moved my site up to dreamhost and am having some issues with sending mail via php. Is there anything you need to do on DH to make mail(); work? Or should I use some other system?
Thanks!
I just moved my site up to dreamhost and am having some issues with sending mail via php. Is there anything you need to do on DH to make mail(); work? Or should I use some other system?
Thanks!
No error messages. Are there logs anywhere I can check. I get access denied on the mail.log when I SSH into the host. This is my function I’m using… I shortened it for this post but it’s pretty basic:
function sendWelcome($user, $email, $pass, $file){
$from = "From: ".NAME." <".ADDR.">";
$subject = "Welcome!";
$body = $user.",\n\n"
."Welcome!"
mail($email,$subject,$body,$from);
return;
}
That should work, shouldn’t it?
Your problem looks like it is because these two lines are formatted incorrectly:
[php]$body = $user.",\n\n"
.“Welcome!”[/php]
Do this:
[php]$body = $user.",\n\n
Welcome!";[/php]
The problem turned out to be… well… not sure!
I opened a support case with DH. They tested it and said it was fine. And it was… my code worked.