cant send email from local computer

hi;
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 xxx@myinternetmailserver.com.tr mail is send successfully. but when i try sending it in a local machine like sendmail -t -f username xxxx@myinternetmailserver.com.tr an error is sent to my mailbox like:

<myinternetmailserver.com.tr>: Host or domain name not found. Name service
    error for name=myinternetmailserver.com.tr 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 "myinternetmailserver.com.tr ", on class SMTP::_sendtohost() in /srv/www/..../smtp.php on line 973
unknown


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

Computer101
EE Admin
0
 
DigitalOswaldCommented:
I'm going to guess you are using sendmail?

Try editing /etc/hosts and add <yourip> myinternetmailserver.com.tr
0
 
kenanerdeyAuthor Commented:
ok, i solved the problem. i added line :  relayhost = myinternalmailserver.com. and then used the php's mail function.
thanks.
0
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.