# Problems sending mail

## Herodot

Hi,

I'm trying to use phpBB (the forum system you're using right now) on a single machine (for arguments sake...). Everything works fine, apart from when phpBB tries the send mail. Then the system hangs or worse, and no mail is ever send.

I'm sadly beginning to become slightly confused as to whether the machine itself should be an SMTP server, or it should pass the mail on to my ISP's SMTP server (as my mail program does). Which is it?

I suppose phpBB uses a standard php sendmail function that itself uses a standard linux mail function. I've not been able to get it to work. It's only a matter of sending mail out of the system, there's no incoming mail.

I think ssmtp, sendmail and postfix all uses "sendmail" as a link, so that whichever is installed, refering to sendmail will run it. So I use syntax like this:

```
echo "something" | sendmail "to:me@myisp.dk"
```

Is that the right way to test sendmail (or ssmtp)?

Emerging ssmtp, sendmail and postfix gives me different config files to works with, but none are very easy for me. I think (from reading logs) that my main problem is setting the sender domain for the system.

ssmtp seems to be the easiest to configure, so if that can do what I need, I'd prefer to use that. Can it?

The configuration file for ssmtp is quite small. Could somebody please provide a complete example? Or at least tell me what I should put where given the nature of my system as stated?

Thanks a lot!

Herodot

----------

## mglauche

if you have an isp where u can forward emails to, ssmtp seems to be the sane choice. You'll have to configure ssmtp to relay the mail to your isp, then the php mail() function should work.

----------

## Herodot

Thanks, that's what I wanted to hear. Can you (or anyone) help with the actual configuration?

Thanks,

H

----------

## klieber

 *Herodot wrote:*   

> I'm trying to use phpBB (the forum system you're using right now) on a single machine (for arguments sake...). Everything works fine, apart from when phpBB tries the send mail. Then the system hangs or worse, and no mail is ever send.

 

In your phpBB, go into the admin panel and click on the "configuration" option in the "General Admin" menu.  Scroll all the way to the bottom of that page and you'll see an option; "use SMTP for mail".  Click "yes", then enter the hostname or IP address for your ISP's SMTP server and you should be good to go.

--kurt

----------

## Herodot

 *Quote:*   

> In your phpBB, go into the admin panel and click on the "configuration" option in the "General Admin" menu. Scroll all the way to the bottom of that page and you'll see an option; "use SMTP for mail". Click "yes", then enter the hostname or IP address for your ISP's SMTP server and you should be good to go.

 

I was beginning to suspect as much. Thanks a lot, this solves all my problems!

BTW: phpBB is awesome!

Thanks all!

Herodot

----------

## mixmasterdj2002

ok, well I use PHP-Nuke and I have a very similar problem, but unlike phpbb there is no option in the config files to add ssmtp server hostname...

I was wondering if there is anyway to configure php directly to use the ssmtp server...

Or if anyone else knows how I could do it, then that would be groovy..  :Twisted Evil: 

Thanks In Advance

----------

## klieber

 *mixmasterdj2002 wrote:*   

> Or if anyone else knows how I could do it, then that would be groovy.. 

 

Just like your ASP question, Google has the answer to your question.  (look at the ~5th result that gets returned)

Maybe you ought to consult Google more often...

--kurt

----------

## mixmasterdj2002

Made those changes, but still the damn thing wont send emails.. Grrrrrrrr

when I tried 

```
echo "something" | sendmail "to:me@isp.com"
```

I got a nice little error

sendmail: can't open the smtp port (25) on mail

I think this means that there is something wrong with port 25 or sumthin :S

have a look @ my phpinfo and tell me what I have done wrong please..

http://djsleepy.servebeer.com/phpinfo.php

I would love to get this working propperly by the weekend.. LOL

Thanks In Advance..

P.S Sorry If Im a pain..

----------

