Sponsored Content
Full Discussion: Send e-mail to users
Top Forums Shell Programming and Scripting Send e-mail to users Post 302515567 by msrahman on Wednesday 20th of April 2011 11:59:57 AM
Old 04-20-2011
Send e-mail to users

Dear all,

The perl script to send e-mail is working in my current script.
Code:
#This part of the script will send the email notification
my $to='mohamed.rahman@noridian.com';
my $from='xyz@hotmail.com';
my $subject='POS_CODES_38 DATA LOADED SUCCESSFULLY.';
my $message='The total no. of files loaded into the POS_38 table are:';

# send email using UNIX/Linux sendmail
open(MAIL, "|/usr/sbin/sendmail -t");
my $out = "testing";

## Mail Header
print MAIL "To: $to\n";
print MAIL "From: $from\n";
print MAIL "Subject: $subject\n";
print MAIL "Message: $message\n";
## Mail Body
print MAIL $out;
close(MAIL);

I want to add
Code:
$ perl -le 'print $==()=<>' 2011040875770.MBT.A0MW9693.NDM.HBIDT.AD38XADJ.txt

this in my e-mail functionality, which will send the e-mail to the user, with the total counts of the records loaded into the table.

How am i suppose to add this functionality in my existing perl mail functionality.

Thanks.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to send mail to multiple users ???

Hi All, How to send mails to multiple users using a single mailx command. Urgently require help Thanks in advance Rgds Arunava (3 Replies)
Discussion started by: arunava_maity
3 Replies

2. UNIX for Dummies Questions & Answers

can not send mail from unix server to company/yahoo mail

hi, Gurus, I need some help with sending mail out from my UNIX server: It is running Solaris 2.6 and the sendmail version is 8.8. Output of :/usr/lib/sendmail -d0.1 -bt < /dev/null Version 8.8.8+Sun Compiled with: LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND NDBM NETINET ... (5 Replies)
Discussion started by: b5fnpct
5 Replies

3. UNIX for Dummies Questions & Answers

How to send html file in a mail not as an attachment but it should display in the mail in table for

Hi The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment . cat Employee.sql SET VERIFY OFF SET PAGESIZE 200 SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON - HEAD... (0 Replies)
Discussion started by: mani_isha
0 Replies

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

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

6. Shell Programming and Scripting

How to send mail using PHP mail function On apache server.?

Hello, I am using centos-6.2 I have apache server,php5 on my system and I want to send mail using sendmail on my system. when I try to send mail from shell that time mail is succesfully sent to respective address() but when I try to send it through webbrowser I am not able to send it.... (1 Reply)
Discussion started by: Kiran ursal
1 Replies

7. Ubuntu

Not able to send mail out of UbuntuBox in send mail

Hi Guys.. yesterday i purchased a VPS server and installed sendmail on ubuntu 12.4 with Webmin & Apache runing webserver problem is.. i can send mail via webmin user interface account to anybody to out side to any domain and able to recieve any mail from any domain.. Now main... (2 Replies)
Discussion started by: cmdman
2 Replies

8. Shell Programming and Scripting

Send a mail to multiple users

I have a file 1.txt which has 3 mail ids as below: Maillist=abc@gmail.com def@gmail.com rcg@gmail.com Now I want to write a script which will read this file and send the mail to all the users present in this file. (6 Replies)
Discussion started by: Vivekit82
6 Replies

9. UNIX for Beginners Questions & Answers

How to write a UNIX script to send a mail to the respective individual users about their groups?

Hi Team, I got a requirement to send a mail to the individual users of a unix server about their respective groups. can some one help me to provide the script as I am unable to write that. I tried with below lines but I come out with errors. cat /etc/passwd | awk -F':' '{ print $1}' |... (6 Replies)
Discussion started by: harshabag
6 Replies

10. UNIX for Advanced & Expert Users

Client was not authenticated to send anonymous mail during MAIL FROM (in reply to MAIL FROM comm

I am having trouble getting mail to work on a red hat server. At first I was getting this message. Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies
CLAWS-MAIL-NEWMAIL-PLUGIN(1)				      General Commands Manual				      CLAWS-MAIL-NEWMAIL-PLUGIN(1)

NAME
claws-mail-newmail-plugin -- Message header summary to a log file. DESCRIPTION
This manual page documents briefly the claws-mail-newmail-plugin This manual page was written for the Debian distribution because the original program does not have a manual page. claws-mail-newmail-plugin is a plugin (loadable module) for the Claws Mail mailer. This plugin writes a summary of new mail headers to a log file. Writing is done after sorting. USAGE
Before using a plugin you must instruct Claws Mail to load it on startup. For this you must go ``Configuration'' menu on main window toolbar, open ``Plugins...'' dialog, click on the ``Load plugin...'' button and select the plugin file, named newmail.so, and press the ``Open'' button. FILES
~/Mail/NewLog Default filename where header summary is written. SEE ALSO
claws-mail (1), claws-mail-extra-plugins (1). AUTHOR
claws-mail-newmail-plugin was written by H. Merijn Brand h.m.brand@xs4all.nl This manual page was written by Ricardo Mones mones@debian.org for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. CLAWS-MAIL-NEWMAIL-PLUGIN(1)
All times are GMT -4. The time now is 01:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy