Link to home
Start Free TrialLog in
Avatar of shragi
shragiFlag for India

asked on

Shell Mail is not working

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.
Avatar of kenfcamp
kenfcamp
Flag of United States of America image

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
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
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.
Shragi,

Please provide feedback
ASKER CERTIFIED SOLUTION
Avatar of skullnobrains
skullnobrains

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial