# Sendmail setup



## Alex4108 (Feb 9, 2011)

So I'm pretty fluent when it comes to things like Linux Apache + PHP w/ sendmail, but ever since I've used my FreeBSD 8.1-Release server, Sendmail has been broken when sending via PHP.

What I'm trying to accomplish is a PHP registration script. The database entry portion works every time, however the Sendmail portion (email to me for activation) always fails.

In forum systems, the registration mail never arrives to users either, even though it is configured.

Steps I've taken:

/usr/local/etc/php.ini: 


```
sendmail_from: [email]xbl@mydomain.net[/email]
sendmail_path: "/usr/libexec/sendmail/sendmail -t -i"
```

/etc/rc.conf:


```
sendmail_enable="YES"
sendmail_submit_enable="YES"
sendmail_outbound_enable="YES"
sendmail_msp_queue_enable="YES"
```

/etc/mail/mailer.conf:


```
sendmail        /usr/libexec/sendmail/sendmail
send-mail       /usr/libexec/sendmail/sendmail
mailq           /usr/libexec/sendmail/sendmail
newaliases      /usr/libexec/sendmail/sendmail
hoststat        /usr/libexec/sendmail/sendmail
purgestat       /usr/libexec/sendmail/sendmail
```

Yes, i've also verified that sendmail is at /usr/libexec/sendmail/sendmail.

So, can someone point out what I've done wrong/what I need to fix?  Thanks!


----------



## SirDice (Feb 10, 2011)

Is sendmail configured correctly? Can you send mail on the commandline?


----------



## lbol (Feb 10, 2011)

Have you checked /var/log/maillog for any error messages? You may also want to check the mail queues. Do you get error messages from your script?


----------

