LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-23-2005, 11:03 PM   #1
Wynd
Member
 
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511

Rep: Reputation: 32
Sending automated emails


I need a program that will send emails using an SMTP server that is non-interactive (i.e., something I can put in a cron job). Can I use sendmail for this? If not, then what?
 
Old 10-23-2005, 11:11 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
'man mail'

For example:

/bin/mail -s "Some subject" someuser@somedomain.com < somefile.txt
 
Old 10-23-2005, 11:24 PM   #3
Wynd
Member
 
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511

Original Poster
Rep: Reputation: 32
There is no /bin/mail on my system, nor in any of the packages. Is it a link to something else?

Also, I want to use another computer as the SMTP server. Does that change anything?
 
Old 10-23-2005, 11:27 PM   #4
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
Can you provide some context for your question?
 
Old 10-23-2005, 11:47 PM   #5
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
The mail command is part of the mailx package, which is usually installed (but apparently not on your Slackware). Google indicates that Slackware has the mailx package avialable, so install it. You will need to install sendmail or similar MTA to forward mail to your remote SMTP server.
 
Old 10-24-2005, 01:20 AM   #6
Chowroc
Member
 
Registered: Dec 2004
Posts: 145

Rep: Reputation: 15
You can use mutt in command line as mail, it support attachment well. If you want to mail with a non-local SMTP, add esmtp to enforce your "mail or mutt"
 
Old 10-25-2005, 11:03 PM   #7
Wynd
Member
 
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511

Original Poster
Rep: Reputation: 32
Quote:
Originally posted by J.W.
Can you provide some context for your question?
I have some text files containing email addresses, and each set of addresses and the accompanying message is different. Instead of having to go into an email client or Web interface each time to compose a new email and copy/paste everything, I would like to write a shell script that will read the addresses from file 1 and send them text 1, read the addresses from file 2 and send them text 2, etc. However, I don't know of a non-interactive mailer that can do this.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending Emails Dragons_Way Linux - Software 2 03-09-2005 02:53 AM
qmail not sending emails lsimon4180 Linux - Software 1 10-18-2004 11:35 PM
Planned sending of emails Denisvt Programming 1 05-08-2004 08:34 AM
help with sending html emails pdelucia Linux - General 1 09-13-2003 11:06 AM
Automated sending attachments through eamil kevin.mccullor Linux - Newbie 1 07-28-2003 01:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration