Operating System - HP-UX
1820475 Members
2847 Online
109624 Solutions
New Discussion юеВ

Send mail from UNIX to E-mail box (WINDOWS)

 
SOLVED
Go to solution
augusto cossa
Frequent Advisor

Send mail from UNIX to E-mail box (WINDOWS)

Hi to all,

I'm looking for a easy way to send mail from unix box "could be from root prompt" to e-mail address which is on box running windows. Example:

#mail "popopooooo" to myaddress@here.com

Your help will be appreciated.

Augusto
3 REPLIES 3
Balaji N
Honored Contributor

Re: Send mail from UNIX to E-mail box (WINDOWS)

hi,
your question is not very clear. are u having a mail server runnig on a windows box and you want this to be used to send a mail to the user.

if that is the case, just set the DS macro (smart host) to the hostname of the windows server and restart sendmail for changes to take effect. if you are using the ip address instead and your server doesnt have a DNS server, dont forget to enclose the IP in square braces ([xxx.xxx.xxx.xxx])

if that is not the case, get a pop server, install it on the unix box and point the email client on windows to fetch mail from this server.
http://hpux.connect.org.uk/hppd/hpux/Networking/Mail/qpopper-4.0.4/

hth
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
KapilRaj
Honored Contributor

Re: Send mail from UNIX to E-mail box (WINDOWS)

First of all do you have sendmail installed .... If not install it Relaqy it to the Email box running on ur windows box & use sendmail / mail command to send emails...

echo Hello |mail kaps@kaps.com

kaps
Nothing is impossible
John Meissner
Esteemed Contributor
Solution

Re: Send mail from UNIX to E-mail box (WINDOWS)

There are many... many topics covering this in the forum...

but ....

1st you need to make sure your Unix box is set up to send mail to your SMTP server. To do this edit /etc/mail/sendmail.cf and uncomment the line that starts with:
DF
and also add your mail server to this line:
DF mailserver.mydomain.com

then type:

mailx -s "subject" -r return_address address_to_send_to < textfile
or
command | mailx -s "subject" -r return_address address_to_send_to
or
cat file | mailx -s "subject" -r return_address address_to_send_to
or to send an attachment:
uuencode filename | mailx -s "subject" -r return_address address_to_send_to

Hope this helps
All paths lead to destiny