Solved

Shell Mail is not working

Posted on 2016-09-27
5
104 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 26

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

773 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