 |
 |
Sending Mail from unix prompt
|
 |
|
 |
|
Forum Regular
Join Date: Jan 2001
Location: Sacramento, CA, USA USA USA
Status:
Offline
|
|
How cn i send mail from the unix prompt? I have a Perl program that i would like to have send a text message (via and email) to my cell phone. if i type 'mail me@myaddress.com' and put somethign in the subject and body and send it, i never recieve it.
daveninja.com
|
|
daveninja.com
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Apr 2002
Location: Italy
Status:
Offline
|
|
Originally posted by DaveNinja:
How cn i send mail from the unix prompt?
Code:
cat << *eof
this it the text of the mail...
You can have as many lines as you like
*eof | mail name@site.com
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Jan 2001
Location: Sacramento, CA, USA USA USA
Status:
Offline
|
|
I still dont get the email that was sent.
its like the 'mail' function isnt sending the mail out of the computer
daveninja
|
|
daveninja.com
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Sep 2000
Location: Springfield, MA
Status:
Offline
|
|
Are you sure sendmail is running at all? OS X is not setup by default to be able to send mail like that.
|
|
We hope your rules and wisdom choke you / Now we are one in everlasting peace
-- Radiohead, Exit Music (for a film)
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Jan 2001
Location: Sacramento, CA, USA USA USA
Status:
Offline
|
|
sendmail not running is the problem. How do i start sendmail running?
daveinja
|
|
daveninja.com
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Jan 2001
Location: Sacramento, CA, USA USA USA
Status:
Offline
|
|
I got sendmail running. i cant get the mail to leave my computer though.
|
|
daveninja.com
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Sep 2000
Location: Springfield, MA
Status:
Offline
|
|
Do you mean that if you send a message to your local account it works?
Try checking for error messages in /var/log/mail.log, and in /var/tmp/console.log
|
|
We hope your rules and wisdom choke you / Now we are one in everlasting peace
-- Radiohead, Exit Music (for a film)
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 1999
Location: San Jose, CA
Status:
Offline
|
|
Originally posted by DaveNinja:
I got sendmail running. i cant get the mail to leave my computer though.
... and your mail logs say what, exactly?
|
|
Gods don't kill people - people with Gods kill people.
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status:
Offline
|
|
Make sure you've opened port 25 in your firewall and/or router.
For anyone joining late, this guide:
Configuring Sendmail on Jaguar at the O'Reilly DevCenter
was perfect for getting Sendmail up and running in 10.2
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Apr 2001
Location: Cary, NC
Status:
Offline
|
|
Originally posted by DaveNinja:
How cn i send mail from the unix prompt? I have a Perl program that i would like to have send a text message (via and email) to my cell phone. if i type 'mail me@myaddress.com' and put somethign in the subject and body and send it, i never recieve it.
daveninja.com
If you are doing this in perl, I have had good success with MIME::Lite
Code:
use MIME::Lite;
my $msg = new MIME::Lite
From => $from,
To => $to,
Cc => $optional,
Subject => "Whatever",
Type => 'TEXT',
Data => "$string";
$msg->send;
You can even tell it to use a different smtp server (like your normal ISP server) (do a perldoc MIME::Lite for the info)
HTH,
Mike
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|