Solved

Shell Mail is not working

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Read this checklist to learn more about the 15 things you should never include in an email signature.
In the wake of AWS' S3 outage, we want to discuss the importance of storage and data diversification in the event of a hack, crash, or system disruption. We spoke with Experts Exchange’s COO Gene Richardson for a deeper understanding.
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

730 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