dirctions please sendmail setup

sorush
sorush used Ask the Experts™
on
Hi, I have an apache and php server setup . Ubuntu. I want to use the email() function in php to send emails from a form to my self. So I assume I need to setup sendmail.
Here is what I think the situation looks like:

My server / computer hosting php / apache / sendmail
From my browser i go to www.sorushnazari.com/quickContact.php
I send the content of the form.
I get a congrats message.
Then I assume that:
broser send message to mail() function > my php server asks sendmail to send the email > sendmail sends the email to info@yourcomputersfixed.com as spec by the mail() func. > email goes to the remote mail.yourcomputersfixed.com > finds info account > puts the mail in the mail box.

Then:

I open thunderbird > access the mail info@yourcomputersfixed.com

But I don't see the mail.

The main error I get is:

p780SBOs012929: p780SCOs012931: DSN: User unknown,
sm-mta.
then after that I get the message.

p780SCOs012931: to=<www-data@sorush2-desktop.local>, delay=00:00:01, xdelay=00:00:01, mailer=local, pri=30000, dsn=2.0.0, stat=Sent

How do I resolve this issue.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software and Hardware Engineer
Commented:
I assume you mean the mail() function in php.
I would check the mail logfile in /var/logs on the ubuntu box, but suspect the problem is that the target mail server is not resolving or unreachable from your server.

if you run the following command on the buntu box:

nslookup -q=mx yourcomputersfixed.com

it should tell you where mail should be delivered to (in my case, I get
mail.yourcomputersfixed.com     internet address = 79.170.40.24 )

now try a manual connection. run:

telnet <ip from nslookup result> 25

response should be something like:

220 mail24.extendcp.co.uk ESMTP Exim Tue, 15 Nov 2011 09:37:26 +0000

now say ehlo:

ehlo mail-test

and start a conversation:
mail from: testhost@mail-test.com
rcpt to: info@yourcomputersfixed.com

if you get:

250 Accepted

then it isn't a comms issue.

regardless, type:

quit

to exit the conversation tidily, and let me know how you got on :)



Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial