Pl. Help me in code Email


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Pl. Help me in code Email
# 1  
Old 08-09-2006
Error Pl. Help me in code Email

i have working in informatica & unix (Kshell), i need the simple programm
( to sending of Email in (Kshell Script)).

Pl. any one help to do so.

From
Karthik Smilie
# 2  
Old 08-09-2006
you can create a file (msg1.txt) that contains your email message.

send it using this command
mailx -s "Your Subject" email_address@dom.com < msg1.txt
or
cat msg1.txt | mailx -s "Your Subject" email_address@dom.com
# 3  
Old 08-09-2006
Sendmail

Use perl programe

my $sendmail = "/usr/sbin/sendmail -t";

open(MAIL,"|$sendmail");

print MAIL "To: ".$to."\n";

print MAIL "From: ".$from."\n";

print MAIL ("Reply-To: <msvinaykumar\@yahoo.com>\n");

print MAIL "Subject:".$sub."\n";

print MAIL "Content-Type:text/html; charset=ISO-8859-1"."\n";

print MAIL "X-Server-Name: "."db.trimtabs.com"."\n";

print MAIL "X-Server-Admin: "."rich@trimtabs.com"."\n";

print MAIL $body3;

close (MAIL);
# 4  
Old 08-10-2006
You can try with this script....this will show you how to enter subject ,body and attachment.

Code:
FILE_NAME="one.xls"
`cat > mail_filewatcher.log <<!
Team - Here is the action to be taken based on this mail.
Please work on the exceptions listed in the attachment to ensure. 


THIS IS A SYSTEM GENERATED E-MAIL...PLEASE DO NOT REPLY.
!`
uuencode ${FILE_NAME} ${FILE_NAME}>>mail_filewatcher.log
mailx -s "enter your subject " mailid@xyz.com < mail_filewatcher.log

 
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Email shell script return code

Hi All, I'm new to unix and I have a requirement to execute a shell script and get the return code/Exit code and send it in email. Meaninig we execute a script which in turn execute a shel script and fetches it\s return code and send it to email. I tried the code below as : ... (2 Replies)
Discussion started by: midhun3108
2 Replies

2. Shell Programming and Scripting

Getting email output in single line with out space in email

I have tried below email method and i am getting every thing in single line . i have put echo to provide space, but it is not helping my code ( echo "From: $FROM" echo "To: $MAILTO" echo "CC: $CC" echo "Subject: $SUBJECT" echo "MIME-Version: 1.0" echo 'Content-Type: multipart/mixed;... (6 Replies)
Discussion started by: mirwasim
6 Replies

3. Shell Programming and Scripting

Using top command to email if process is exceeding 25% and sending an email alert if so

This is my first time writing a script and Im having some trouble, Im trying to use the top command to monitor processes and the amount of CPU usage they require, my aim is to get an email if a process takes over a certain percentage of CPU usage I tried grep Obviosly that hasnt worked, Any... (8 Replies)
Discussion started by: jay02
8 Replies

4. UNIX for Dummies Questions & Answers

new to ldap, send email to a ou or group, and see a list from email client

hi, i'm running openldap on ubuntu 10.04, creating new items with apache directory studio (windows version). i use the ldap just as an address book to our small office (email clients are windows live mail 2009, 2011, microsoft outlook 2007 and 2010). a. i cant see a list of the contacts,... (0 Replies)
Discussion started by: V4705
0 Replies

5. Solaris

Send an email from Solaris using Linux email server

Hello everyone I have a problem and I need your help: I have a Solaris 10 and Solaris 8 UNIX Servers, and Linux Centos4 as email server. I need send an email from Solaris servers preferably using Centos4 email server. I have no mail service configured in my Solaris computers (1 Reply)
Discussion started by: aflores
1 Replies

6. Programming

C code for Sending Email with attachment

Hi, I need the C code for Sending Email with attachment through SMTP protocol, running under linux platform. Thanks (1 Reply)
Discussion started by: Mr coder
1 Replies

7. 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