- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Sendmail
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2006 03:32 AM
04-27-2006 03:32 AM
Sendmail
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2006 03:49 AM
04-27-2006 03:49 AM
Re: Sendmail
sendmail user@domain.com < /path/to/file/body
You can also use:
mailx -s "Subject" < /path/to/file/body
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2006 04:31 AM
04-27-2006 04:31 AM
Re: Sendmail
to complete Ivan's solution, provide the user(s) the mail is sent as additional arguments:
mailx -s "Subject" user1@dom1 user2@dom2 ... < /path/to/file/body
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2006 05:27 AM
04-27-2006 05:27 AM
Re: Sendmail
Shalom,
Take a look at this:
http://www.hpux.ws/mailfile2
It has some moderate to advanced sendmail scripting in it.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2006 07:27 PM
04-27-2006 07:27 PM
Re: Sendmail
some example :
simple text :
(
echo "To: joel
echo "From: system $(hostname)
echo
echo "Systeme $(hostname) $(date)"
echo "Update time: The time has been updated"
) 2>&1 | /usr/lib/sendmail -t
text + two attached files :
{
echo "To: loic@host.domain
echo "From: system $(hostname)
echo "Cc: joel@host.domain
echo "Subject: compte rendu de l'analyse des sauvegarde"
echo 'MIME-Version: 1.0'
echo 'Content-type: multipart/mixed; boundary="xxxxyyyzzqzzyyyxxxx"'
#text
echo '--xxxxyyyzzqzzyyyxxxx'
echo ''
echo "Systeme $(hostname) $(date)"
echo "Surveillance de la sauvegarde des PC utilisateurs"
echo "Voir les fichiers joints"
#first attached file
echo '--xxxxyyyzzqzzyyyxxxx'
echo 'Content-Disposition: attachment; filename="'$(basename $tmpfilename)'"'
echo ''
cat "$tmpfilename"
#second attached file
echo '--xxxxyyyzzqzzyyyxxxx'
echo 'Content-Disposition: attachment; filename="'$(basename $fichier_csv)'"'
echo ''
cat "$fichier_csv"
echo '--xxxxyyyzzqzzyyyxxxx--'
} | /usr/sbin/sendmail -t
Joel