The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - Newcomers (http://hintsforums.macworld.com/forumdisplay.php?f=15)
-   -   Send an email inside Terminal (http://hintsforums.macworld.com/showthread.php?t=81165)

acme.mail.order 07-25-2009 01:44 AM

Type:

mail person@example.com

and follow the prompts. type
.

all by itself to finish.
Wether the recipient gets the message depends a lot on your ISP's outgoing mail policies.

Straitsfan 07-25-2009 07:53 AM

I just tried sending a message to my own gmail account. I typed my email address, pressed return, and got the subject line, entered 'test' as subject, pressed return, and entered some more text, then pressed return again, then the . it said "EOT" and the terminal prompt. But there's nothing inside my gmail inbox.

Do I have to configure something else? And why is it so complicated? The book I have doesn't explain this. Are there any other books on UNIX that I could get/you recommend? I'm currently reading "Learning the bash shell' by Newham & Rosenblatt, published by O'Reilly.

acme.mail.order 07-25-2009 08:03 AM

The last sentence of my previous post is your answer. Many ISPs block mail servers other than their own, preventing bot-spam but also preventing you sending out mail.

On the other end, receiving mail servers sometimes block mail from servers that don't have a vaild reverse DNS record (your home machine will definitely not have a valid record).

I can't send mail from my home machine either, but I can from my web provider's machine, same command.

baf 07-25-2009 08:11 AM

see this hint it configures postfix to send mail via your isp and should work.

honestpuck 07-27-2009 07:18 PM

Straitsfan,

Well if you type "man mail" at the command prompt you'll get a nice summary.

mail -s "I'm sending you a letter" someone@example.com < letter.txt

That line tells you most of what you need to know.

You run the mail command supplying it a subject and the address you want the letter to go to and then redirect in the text.

// Tony


All times are GMT -5. The time now is 10:17 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.