sending mail


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers sending mail
# 1  
Old 01-22-2007
sending mail

i want to send an email from the unix machine to the windows machine.
now windows dont have any specified folder for the mail. mail has to be sent to the email-id like abc@xyz.com
unix machine itself can not directly send mail.
it has to be transferred via mail server.

Last edited by parmeet; 01-22-2007 at 02:01 AM..
# 2  
Old 01-22-2007
mailx -s "subject" abc@xyz.com <mail_body.txt
# 3  
Old 05-11-2009
Hi,

I am writing a script wherein I have got a file date3 in my current directory
which I want to send to my lotes notes id abc.com via email.

I have seen a number of posts on this but unable to get my work done.

here is the code which I have tried

cat date3 | mailx -s &quot;hii&quot; abc.com

but it directly comes on prompt without giving any output whereas I want to get this file date3 on my mail box id i.e abc.com

I am working on HP-UX.

Feel free to share your ideas or any solutions related to this.

thanks in advance,
haris

Last edited by haris; 05-11-2009 at 06:32 AM..
# 4  
Old 05-11-2009
You can use uuencode command to attach the file and send it to your email.

uuencode <filename> <newfilename>| mailx -s "<Subject>" abc@com
# 5  
Old 05-12-2009
Hi Krrishv,

Thanks for your reply.
But still I am unable to figure this out.Now I have tried sendmail command.

Here is the code :

sendmail -v "unix" -t abc.polaris.co.in < date3

Here date3 is file in my current path which I want to send to my lotus notes id.
Now when I run my script it comes to command prompt and gives me this error

uxmum12: /trimsbld/users/abc/.practice> mail1
unix... Connecting to sunbom1.cosl.in.citicorp.com. via relay...
unix... Deferred: Connection timed out with sunbom1.cosl.in.citicorp.com.
abc.polaris.co.in... Connecting to polaris.co.in via esmtp...
abc.polaris.co.in... Host unknown (Name server: polaris.co.in: host not found)
/trimsbld/users/abc/dead.letter... Saved message in /trimsbld/users/abc/dead.letter
uxmum12: /trimsbld/users/abc/.practice>

Whereas I want date3 file sent to my id abc.polaris.co.in

Any suggestions on this one,please let me know.

thanks in advance,
haris
# 6  
Old 05-12-2009
It looks like SMTP relaying is not enabled for that server. You should check whether SMTP relaying is allowed for that server.

You can probably check whether relaying is enabled or not using the below command from your server.

telnet <Outbound SMTP Relay Server>:25

Outbound SMTP Relay Server should be your SMTP relaying server and default port is 25.
# 7  
Old 05-12-2009
How do we check that SMTP relaying is enabled or not for any server?

thanks in advance,
haris
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Problems sending mail: Difference between Mail and Mailx?

Whats the difference between mail and mailx? I'm trying to troubleshoot a problem where I can send mail from server A with this `echo $MESSAGE | mail -s "$SUBJECT" -r $FROM $RECIPIENTS` command but executing the same command from server B throws me this error (Both servers are RHEL) ... (1 Reply)
Discussion started by: RedSpyder
1 Replies

2. UNIX for Dummies Questions & Answers

Sending mail

How can i send a mail when user login in unix ENV. How can i know present use mailID?? Moved out of Contact Us Forum - Please Do Not Post Technical Questions in Non-Technical Forum(s) (1 Reply)
Discussion started by: arun508.gatike
1 Replies

3. Shell Programming and Scripting

Sending Mail

Hi All, I have a script that looks like this: *********** #!/bin/sh -x cd /u01/app/oracle/diag/rdbms/spdb/spdb/trace cat alert_spdb.log|grep Archiver >/dev/null if ; then mailx -s "Archiver message in Alert log" user@email.com fi ************ Im using the -x option to see any... (1 Reply)
Discussion started by: oradba888
1 Replies

4. Shell Programming and Scripting

Stop sending mail after certain number of mail

Hi guys... I am busy writing a script to notify me via an mail if my application is down. I have done that. Now I want this script to stop sending mails after five mails were sent but the script should keep on checking the application. When the application is up again that count should be... (5 Replies)
Discussion started by: Phuti
5 Replies

5. Shell Programming and Scripting

Sending mail

Hi there, How can I send the automated log file, daily at 7 am to the respective mail . Thanks in Advance, Neha (2 Replies)
Discussion started by: NehaKrish
2 Replies

6. Ubuntu

help sending mail

Hi, I have kubuntu 8.10 and I would like to configure Ubuntu to can send mail from command line with mailx. I've saw that I need to install a MTA. But I don't know with install and how. Do you know some howto or url where I find how could I configure it? Many thanks and sorry for my... (2 Replies)
Discussion started by: mierdatuti
2 Replies

7. HP-UX

hp ux not sending mail

Hi.. In Hp ux box,, mails are not being sent. they are getting queued up in mail queue. (3 Replies)
Discussion started by: kkhan
3 Replies

8. Shell Programming and Scripting

Mail sending

Dear all, how can i send mail using mailx or mail command?do i need to configure anything for sending mail?please help me.Its urgent. the version i use is Linux TDM 2.4.21-4.EL #1 Fri Oct 3 18:13:58 EDT 2003 i686 i686 i386 GNU/Linux Thanks Regards, Pankaj (15 Replies)
Discussion started by: panknil
15 Replies

9. UNIX for Advanced & Expert Users

sending mail

How do I send an email with a subject and an attachment from a command prompt? (3 Replies)
Discussion started by: mskarica
3 Replies

10. UNIX for Dummies Questions & Answers

sending a mail to a mail client

Hi everyone! I'm trying to create a database monitoring script that reads an alert file and sends an error message if it can 'grep' a particular string. Is there a way to send this message to a mail client using SMTP? Even better, is there any place on this site that has these kinds of... (5 Replies)
Discussion started by: solaris73
5 Replies
Login or Register to Ask a Question