LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-02-2007, 05:16 PM   #1
mesh2005
Member
 
Registered: Sep 2005
Location: Ägypten
Distribution: Ubuntu 5.10
Posts: 155

Rep: Reputation: 30
Unhappy How to send email using bash?


I tried mail -s 'subject' email , but I didn't receive anything! I tried sendmail and I didn't receive anything too! Please help
 
Old 03-02-2007, 05:22 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
If you don't have sendmail configured, the mail/sendmail program won't work. You can use sendEmail, which doesn't require a sendmail configuration.
 
Old 03-03-2007, 09:19 AM   #3
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
mailx -s subject user < file
 
Old 03-03-2007, 09:21 AM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Code:
echo "This is the message body." | mailx -s "the subject" email@address.bob
 
Old 03-03-2007, 09:48 AM   #5
firstfire
Member
 
Registered: Mar 2006
Location: Ekaterinburg, Russia
Distribution: Debian, Ubuntu
Posts: 709

Rep: Reputation: 428Reputation: 428Reputation: 428Reputation: 428Reputation: 428
Hello!
A couple of months ago I and my friend have written a BASH script which allows to send email: http://tiocu.svn.sourceforge.net/viewvc/tiocu/email/. It depends on base64-encode, base64-decode, telnet utilities.

The reason was configuring complexity of existing programs, though the task is very simple -- just send email (with attachments).

Hope, this is useful!
 
  


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
email 'send' NO - email 'receive' YES..? captain skywave Linux - Wireless Networking 4 04-23-2005 03:35 AM
email 'send' YES - email 'receive' NO..? captain skywave Linux - Wireless Networking 1 04-22-2005 05:23 AM
Write a script to send an email from bash kpelczar Linux - Software 5 02-09-2005 04:19 PM
Need to send email via C lucasbl3 Programming 3 02-25-2004 11:04 AM
Allowing an IP to send email using my email server... culprit Linux - Networking 7 09-09-2003 12:24 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:52 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