Web page php sending of mail does not work

Status
Not open for further replies.

Bernard Mentink

Contributor
Joined
Apr 2, 2016
Messages
193
Hi Guys,

I have a web server (lighttpd) serving up dokuwiki in a jail, and all works fine, except I can't get a php script to send mail (i.e in a "Contact Form").
I have set up my gmail address SMTP/port detail etc in System->Mail, and inputting my password and sending the test email works .... (it uses my root password)
I have tried sending email with "sendmail" in the jail, but that does not work either ..

What am I missing?

Thanks

Edit: Noticed this in the log:
Code:
Mar 29 09:30:57 webpage_2 sendmail[48660]: v2SKUuo5048660: to=myemail@gmail.com, ctladdr=www (80/80), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30362, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]


looks like mail is using www user, does it need to be root?
Actually tried "sendmail" from console root user and that failed the same way.

I am guessing that I need to setup the mailhost in /etc/hosts somewhere, can someone give me any pointers ...

Drat! Found the problem .... seems I had to enable sendmail in /etc/rc.conf .. all good now. Hope this helps someone else.
 
Last edited:
Status
Not open for further replies.
Top