mailx to external email address

Thread Tools Search this Thread
Operating Systems OS X (Apple) mailx to external email address
# 1  
Old 07-11-2011
mailx to external email address

Hi, How can I use "mailx" command to send message to an email address like this?

echo "This email body" | mailx -s "my subject" ""

There may be some setup required in sendmail or postfix??

OS = Snow Leopard 10.6

Last edited by pludi; 07-12-2011 at 09:19 AM.. Reason: update
# 2  
Old 07-12-2011
Set up a "smart host" in sendmail (usually the same machine as the outbound server in your graphical email client.)
If you do not want to use a smart host, then you will need a static ip, dns and reverse dns for the domain that you are using.
# 3  
Old 07-19-2011
I was able to get the sendmail kind of working.
Using the instructions on this site:

I can send mail from OS X.

Now instead of arriving into the inbox, the email goes into the junk mailbox. Could be because gmail is catching it as spam for some reason.

What do you suggest to get around this issue?
# 4  
Old 07-19-2011
Check all the header records in the mail that arrives in junk. You may find the reason that it is marked junk.
Try sending to a Windows POP client (Outlook Express, Thunderbird) and see if it also goes to junk.
# 5  
Old 07-21-2011
I did try to a different address and it went through ok. Thanks.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Mailx issue; email address starting with #

Hello All, I have a requirement to generate report and send them to a distribution list. The problem I am facing is when sending out the email using mailx. The email address (DL) we have is starting with # and because of this it's not recognising the email and throwing the below error. ... (2 Replies)
Discussion started by: Pradeep_Raj
2 Replies

2. IP Networking

Ping domain indicates the external ip address and not the local ip

when i execute from local machine ping domainname i get the external ip address but i am on local dns and i expect the local ip address.. using nslookup : no problem so i cannot find why... thanks (2 Replies)
Discussion started by: activedms
2 Replies

3. Shell Programming and Scripting

External IP Address of Linux Server

Hi, I am trying to find the external IP address of a server "XXX". I logged into server "XXX" and executed nslookup XXX. output number is Later, i have executed "curl". This time i got a different number 611.34.63.22 Out of these two numbers, what number... (1 Reply)
Discussion started by: forums123456
1 Replies

4. UNIX for Dummies Questions & Answers

How to verify email address using mailx command ?

Is there any way i can verify the email address (before sending the mail) using the mailx command ? I know that sendmail -bv can do it but there is a compatibility issues with the version of Unix we have. So mailx is the only command we can used at this point. Any... (1 Reply)
Discussion started by: rak007
1 Replies

5. IP Networking

Obtaining your external IP address using a Unix Utility

Hello, this is my first post on the Unix forums. This is something that's been bothering me for a while, is there any particular UNIX/Linux application that will allow you to see you external IP address? :confused: ( The address beyond your router ) Thank you in advance, I could not find a... (4 Replies)
Discussion started by: inquen
4 Replies

6. OS X (Apple)

Getting the External IP Address of your Computer and Storing it in a File

My computer is one of three computer on our LAN. Our router is a Time Capsule. My computer is the only of of three computers that has been assigned a static IP address on the LAN, because it runs an Apache installation. I tinker around with web development from time to time, and I wanted to be... (7 Replies)
Discussion started by: Audacitor
7 Replies

7. Shell Programming and Scripting

how to know if the mailx command really sends the mail to the email address?

Hi guys, I have a question about the returning message of the mailx command. if I run a mailx command, how can I know if the email has been sent to the email address? If the email address doesn't exist, is there any error message returned? If yes, how can I get the error message? Thanks... (3 Replies)
Discussion started by: sheenshine
3 Replies

8. UNIX for Dummies Questions & Answers

mailx- can we change the from address in the email that is sent out.

Hello, Is there anyway to change the from address in the email sent using mailx command? I have the following command: mailx -s $subject < $mail_mesg This defaults to the following format "" as the from address in the email. Problem is this... (5 Replies)
Discussion started by: radhika
5 Replies

9. UNIX for Dummies Questions & Answers

Send email where # is in the email address - Using Unix

Hi All, How do I send an email using malix where email address contains a #. I have a email address like this : I want to send email like malix -s "TEST" < SOMEFILE I tried \# but doesn't work. Please let me know how we can achieve this? I am in... (1 Reply)
Discussion started by: jingi1234
1 Replies

10. UNIX for Advanced & Expert Users

Unable to send eMail from a UNIX-Host ( using mailx ) to a Outlook-email-addres(Win)

Hi A) I am able to send eMail using mailx from a UNIX ( solaris 8 ) host to my Outlook-email-ID : ( This is NOT my actual -eMail-ID). But in Outlook the "From :" eMail address is displayed as " " .i.e the words... (2 Replies)
Discussion started by: Vetrivela
2 Replies
Login or Register to Ask a Question

Featured Tech Videos