using mailx to send a log file to my outlook e-mail account


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers using mailx to send a log file to my outlook e-mail account
# 1  
Old 08-27-2004
using mailx to send a log file to my outlook e-mail account

I like to use mailx -s to send an entire xxxxx.log to my outlook e-mail account.
Any help will be appreciated.
Thanks.
# 2  
Old 08-27-2004
mailx -s "Some Subject" user@domain.com < /path/to/some/log

Keep in mind that mailx only helps you if you have some outbound mail capability.

Cheers,

Keith
# 3  
Old 08-30-2004
I always do this by:

cat /my/logfile | mailx -s "subject" user@domain.com

Just another example of how you can do a task lots of different ways in Unix . . . .
# 4  
Old 08-31-2004
UUOC Awarded!

It's also a very good example of UUOC

Smilie
# 5  
Old 08-31-2004
Hey Ygor,

Thanks for the link, I'm always up for a beating from the clue-stick.

However, after reading some of the entries I'm a bit confused. The way I did it I use cat to open the file then | to send it to mailx. The other way you are still having to get the data out of the file and use < to send it to mailx. So I'm not sure why the way I said is considered less efficient. Doesn't the computer have to do the equivalent work either way?

I think after reading it through that doing it the way kduffin suggested mailx itself somehow grabs the data from the file without needing another process, while my way needs 1 process for the cat and another for the mailx. But I'm not sure if I'm understanding it right.

Thanks,
Ralph
# 6  
Old 09-01-2004
# 7  
Old 09-01-2004
Thanks for the link. I've got it open now and will have a look.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Send mail to outlook

Hello Guys, I have a requirement to send an email to outlook from unix script. I have used the below stuff to send an email and it worked on machine A but not on machine B. Please find their versions. Machine A ) Linux xxx 2.4.9-e.40enterprise #1 SMP Thu Apr 8 16:43:01 EDT 2004 i686 unknown... (1 Reply)
Discussion started by: srikanthbiradar
1 Replies

2. UNIX for Advanced & Expert Users

How can I send a mail from my outlook or other mail accounts to UNIX server?

Hi all, I want to send a mail for my business needs from outlook account to an unix server (HP-UX) but I don't send any mail. While I can send from the unix server to my outlook account, I can't send from outlook to unix. How can I achieve this ? How can I send a mail from my outlook or other... (2 Replies)
Discussion started by: igelegin
2 Replies

3. Shell Programming and Scripting

How i can send a mail from outlook to an UNIX server?

Hi all, I want to send a mail for my business needs from outlook account to an unix server (HP-UX) but I don't send any mail. While I can sent from the unix server to my outlook account,I can't send from outlook to unix. How can I achieve this ? How can I send a mail from my outlook or other... (5 Replies)
Discussion started by: igelegin
5 Replies

4. Shell Programming and Scripting

Not able to send the mail using mail and mailx command

Hi All, I am trying to send a mail from linux server but could'nt able to send the mail. I tried the below syntax's so far but no luck. mail -s “Hello world” abc@xyz.com < /usr/g/txt.log cat "txt.log" | mailx -s "Hello world" abc@xyz.com mailx -s “Hello world” abc@xyz.com <... (2 Replies)
Discussion started by: scriptscript
2 Replies

5. Shell Programming and Scripting

Send mail using mailx to CC only, not TO

Hi All, I am using mailx to send the mail. Due to some changes in the requirement, I need to send the mail to CC only (an Email id in CC), with no email ID in "TO" field. Can we do that? bcz I used -c flag only and got the message:":The flags you gave make no sense since you're not sending... (2 Replies)
Discussion started by: unankix
2 Replies

6. Solaris

Unable to send mail through mailx

Hi, I am using solaris 5.9 OS and I am facing an issues with mailx. My SMTP port is configured to listen 6190 and not the default one which is 25. I can send mail to my inbox when i do it manually through the following steps root@<dbname> # telnet 15.12.88.10 6190 Trying 15.12.88.10...... (0 Replies)
Discussion started by: Srinathkiru
0 Replies

7. UNIX for Advanced & Expert Users

need to configure mail setting to send mail to outlook mail server

i have sun machines having solaris 9 & 10 OS . Now i need to send mail from the machines to my outlook account . I have the ip adress of OUTLOOK mail server. Now what are the setting i need to do in solaris machines so that i can use mailx or sendmail. actually i am trying to automate the high... (2 Replies)
Discussion started by: amitranjansahu
2 Replies

8. UNIX for Advanced & Expert Users

how to send file as attachment using mail or mailx

I have a need to send a file from the unix command line to be sent as an attachment. Is this possible? That is when I open my outlook email I need to file to appear as an attachment. Also, is there a way to use the mail binary (not mailx) to modify the "reply address". mailx -r works but I need... (1 Reply)
Discussion started by: kieranfoley
1 Replies

9. UNIX for Dummies Questions & Answers

Unable to send e-mail using mailx command

Hi All, Can you please help me in solving this. I am facing some problem sending mails. If I use like this, I am able to send mail the mail echo "This is an automated e-mail; please do not reply." | mailx -s "Good Morning ." 'abc@xys.com' But if I use like this, then I am unable to send... (1 Reply)
Discussion started by: manas6
1 Replies

10. UNIX for Advanced & Expert Users

Unable to send eMail from a UNIX-Host ( using mailx ) to a Outlook-email-addres(Win)

Hi A) I am able to send eMail using mailx from a UNIX ( solaris 8 ) host to my Outlook-email-ID : FName.Surname@Citigroup.com ( This is NOT my actual -eMail-ID). But in Outlook the "From :" eMail address is displayed as " usr1@unix-host1.unregistered.email.citicorp.com " .i.e the words... (2 Replies)
Discussion started by: Vetrivela
2 Replies
Login or Register to Ask a Question