1827881 Members
1247 Online
109969 Solutions
New Discussion

PHP: mail()

 
Chris Mitchell
Occasional Contributor

PHP: mail()

Does the following setting in /etc/php.ini specify the SMTP server for the local host? I am getting the following error when using PHP mime mail module. I'm not sure why it says Win32 only.

##### /etc/php.ini
[mail function]
; For Win32 only.
SMTP = localhost


#### Error:
Your message could not be sent.
A transcript of the attempts to send the message follows.
The number of attempts made: 1
Addressed To: chris.mitchell@rtp.ppdi.com

Wednesday, 04 June 2003, 15:23:19
(2) Failed to send to identified host,
[inbound.registeredsite.com], 553 5.1.8 ... Domain of sender address
internet@hostname.rtp.ppdi.com does not exist [SMTP server error]
--- Message non-deliverable.
Donuts.... Is there anything thy can't do?
2 REPLIES 2
Jerome Henry
Honored Contributor

Re: PHP: mail()

You shouldn't need to touch this file for sending mail with php. Mail is fully functionnal, except that your smtp server under linux should be configured properly to transmit your mails outside. Read these threads, they are related to your problem :
http://europe-support2.external.hp.com/emse/bin/doc.pl/sid=9098113f0ebcb9022f?todo=search&searchcategory=ALL&rn=&presort=&searchtext=sendmail+relaying+linux&x=38&y=11&searchcriteria=allwords&searchtype=SEARCH_FORUMS
(any of each has the solution to re-hash sendmail and relay).
hth.
J
You can lean only on what resists you...
Steven E. Protter
Exalted Contributor

Re: PHP: mail()

Two ways to get mail off your Linux box.

1) Direct Internet Connection, resolve the target addresses yourself.

/etc/resolv.conf must connect to valid outside dns servers or inside ones that resolve any outside address

2) Relay

in sendmail.cf

DS
[IP_address_of_relay_server}

service sendmail restart

The server defined must explicitly permit relay from your host/ip or the mail will be rejected.

Diagnostic:

sendmail -v -d8 -d38 somebody@mail.net

type a line of text
type a dot
.

This will help you figure out where the mail is getting stopped.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com