cant send email from local computer

i have a mail server in our local network. this mail server is behind nat and can just send e-mail to internet from port 25. in a computer which can goes to  internet, when i try to send email from outlook via this account to mail is send successfully. but when i try sending it in a local machine like sendmail -t -f username an error is sent to my mailbox like:

<>: Host or domain name not found. Name service
    error for type=AAAA: Host found but no data record
    of requested type

when i try sending with php script in the local machine it gives :

Warning: Can not find any valid ip address for hostname " ", on class SMTP::_sendtohost() in /srv/www/..../smtp.php on line 973

any ideas ?
Who is Participating?
Computer101Connect With a Mentor Commented:
PAQed with points refunded (85)

EE Admin
I'm going to guess you are using sendmail?

Try editing /etc/hosts and add <yourip>
kenanerdeyAuthor Commented:
ok, i solved the problem. i added line :  relayhost = and then used the php's mail function.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.