Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Shell Mail is not working

Posted on 2016-09-27
5
113 Views
Last Modified: 2016-10-17
Hi - I am trying to send an email to mobile,so that it can be received as SMS and i used the below code snippet and it is not working
am i missing something

	echo "texting to number" | mailx -s "Text message via email" "1234567890@txt.att.net"

Open in new window


also tried
	echo "texting to number" | mailx -s "Text message via email" 1234567890@txt.att.net

Open in new window


but when i give email it is working

	echo "texting to number" | mailx -s "Text message via email"  abcd@outlook.com

Open in new window


so why it did not work for 1234567890@txt.att.net.
I am sure the sms provider name is correct for att, because when i send email using outlook to 1234567890@txt.att.net i got text message.
0
Comment
Question by:shragi
5 Comments
 
LVL 14

Expert Comment

by:kenfcamp
ID: 41819483
First thing first,

Can you send email normally (ie: through an email client) on that box?

If so:
Is that box configured as a mail server? (Sendmail/postfix configured and operational, etc)
or do you use a third-party email server (gmail, ISP, etc) to send mail
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 41819602
Do you get any error or email fail to deliver message?

You can always test sending email directly using telnet command. Please see steps for using telnet to send email in below link:

https://mediatemple.net/community/products/dv/204404584/sending-or-viewing-emails-using-telnet
0
 
LVL 12

Expert Comment

by:tel2
ID: 41820628
Hi shragi,

mailx has a '-v' (verbose) switch that may help you work out what is going wrong.  If it reveals nothing obvious, maybe you could compare the output you get when you use '-v' to send to 1234567890@txt.att.net and abcd@outlook.com and see if anything looks wrong.
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 41841271
Shragi,

Please provide feedback
0
 
LVL 27

Accepted Solution

by:
skullnobrains earned 500 total points
ID: 41845114
mailx will invoke /usr/lib/sendmail to send the mail. the sender will be picked from environment or will default to username@boxname.

i'd assume your other tests were directed to a local account and you probably do not relay mail to outside accounts.

anyway, whatever is wrong should be visible in /var/log/maillog or mail.log

you can also specify a host such as mx3a.txt.att.net ( which handles incoming mail for txt.att.net ) and directly send the email ( if you have internet port 25 access ), in verbose mode so you can determine if things go wrong. but i don't know if mailx is capable of resending the email in case of failure
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question