Solved

Shell Mail is not working

Posted on 2016-09-27
5
78 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 13

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 11

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…

747 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now