LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-24-2005, 12:03 AM   #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-24-2005, 12:11 AM   #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: 328Reputation: 328Reputation: 328Reputation: 328
'man mail'

For example:

/bin/mail -s "Some subject" someuser@somedomain.com < somefile.txt
 
Old 10-24-2005, 12:24 AM   #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-24-2005, 12:27 AM   #4
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Milwaukee, WI
Distribution: Mint
Posts: 6,642

Rep: Reputation: 69
Can you provide some context for your question?
 
Old 10-24-2005, 12:47 AM   #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: 328Reputation: 328Reputation: 328Reputation: 328
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, 02: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-26-2005, 12:03 AM   #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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 03:53 AM
qmail not sending emails lsimon4180 Linux - Software 1 10-19-2004 12:35 AM
Planned sending of emails Denisvt Programming 1 05-08-2004 09:34 AM
help with sending html emails pdelucia Linux - General 1 09-13-2003 12:06 PM
Automated sending attachments through eamil kevin.mccullor Linux - Newbie 1 07-28-2003 02:15 PM


All times are GMT -5. The time now is 12:09 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration