LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-21-2017, 08:55 PM   #16
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,555

Rep: Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598

In a nutshell the mobile telephone provider uses a SMS gateway to receive the email then send it to the desired phone as a SMS message. Now days automated messages are quite common i.e weather or Amanda alerts as well as waiting lines at restaurants and vehicle registration offices (at least in the US).

https://en.wikipedia.org/wiki/SMS_gateway

Last edited by michaelk; 06-21-2017 at 09:01 PM.
 
Old 06-26-2017, 07:45 AM   #17
trickydba
Member
 
Registered: Nov 2016
Location: Atlanta,Georgia
Posts: 310

Original Poster
Rep: Reputation: Disabled
@michaelk & scasey....that is exaclt what I tried but it didn't work
@ AwesomeMachine....... It is not sent by cellular modem, it through the netwotk at the workplace.
 
Old 06-26-2017, 08:00 AM   #18
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,585

Rep: Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350
How exactly do you do this on Windows? Do you use an existing Outlook account or somwething else? Can you send an email to any email addresses with Linux? When you send to an email address other that the SMS gateway from PowerShell what email address is shown as the sender and do you have that set up on the Linux machinery?
 
1 members found this post helpful.
Old 06-26-2017, 08:38 AM   #19
trickydba
Member
 
Registered: Nov 2016
Location: Atlanta,Georgia
Posts: 310

Original Poster
Rep: Reputation: Disabled
I do this in Windows running a PS cmdlet. I am sending to an existing Outlook account and yes I can send emails to any email address using Linux. I already have emails being sent in Linux just fine. I never really notice what email is shown as the sender.
 
Old 06-26-2017, 08:49 AM   #20
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,585

Rep: Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350
Perhaps I'm being a bit slow here but I still don't understand what exactly you are saying fails.
I asked what I did because, as I understand it, you are trying to send email from your PC to an SMTP server with the address of an email-to-text gateway and a text is not being sent. So, you should understand how important it is to know what credentials you are sending the SMTP server in Windows and Linux and whether there is a difference?
If I am wrong here please explain the exact process by which you are expecting the text message to be generated?
Sorry, I know I am being rude but I'm seeing a lot of "this doesn't work" but not much explanation of how you think it should work.
 
Old 06-26-2017, 08:59 AM   #21
trickydba
Member
 
Registered: Nov 2016
Location: Atlanta,Georgia
Posts: 310

Original Poster
Rep: Reputation: Disabled
@273.....I don't think you are being rude, you just want to help an I appreciate it!

I am using this line of code:

echo "enter message body here" | mailx -s "email subject" recipient@email.com mobilenumber@vtext.com

in a BASH script. Taking out "mobilenumber@vtext.com", sending to the email works just fine. I would like to send to a mobile number instead so it would just pop up on my cell with me having to log into the phone then search for the email. I hope I am explaining myself clearly
 
Old 06-26-2017, 09:09 AM   #22
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,585

Rep: Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350
It looks like your SMTP server can't communicate with the gateway. Do you know which SMTP server you are using? Is this inside a corporate network you didn't set up the exchange servers on?
 
Old 06-26-2017, 09:22 AM   #23
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,555

Rep: Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598
Are you using your complete 10 digit phone number i.e including the area code?

Have you tried sending a text message using a regular email client versus the command line?

Have you tried just the single mobilenumber@vtext.com on the command line instead of two recipients?

If it is a workplace issue have you tried outside your workplace (with an email client)?
 
Old 06-26-2017, 09:27 AM   #24
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.8.2003
Posts: 5,228

Rep: Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915
Quote:
Originally Posted by trickydba View Post
I am using this line of code:
Code:
echo "enter message body here" | mailx -s "email subject" recipient@email.com mobilenumber@vtext.com
in a BASH script. Taking out "mobilenumber@vtext.com", sending to the email works just fine. I would like to send to a mobile number instead so it would just pop up on my cell with me having to log into the phone then search for the email. I hope I am explaining myself clearly
Some "is it plugged in" questions:
Is 'mobilenumber' a 10-digit number, no spaces or dashes?
Does the mail get to 'recipient@email.com' when that line of code is executed? If not, try using a comma instead of a space to separate the email addresses. The space worked on my server, but generally speaking, lists of email addresses should be comma seperated.
As 273 asked, can you ping/traceroute to vtext.com from your mail server?
Do you get any error or BOUNCE messages back? They should go to the sending user's email.

Do you have a GUI email application on that computer? Thunderbird or Evolution? What happens if you send to mobilenumber@vtext.com from the GUI? (BOUNCEes might be more obvious)

[michaelk: Great Minds...]

Last edited by scasey; 06-26-2017 at 09:29 AM.
 
Old 06-26-2017, 09:48 AM   #25
trickydba
Member
 
Registered: Nov 2016
Location: Atlanta,Georgia
Posts: 310

Original Poster
Rep: Reputation: Disabled
@273...yes it is in the corporate environment and I am using the same SMTP server used in other working scripts.
@michaelk... yes I am using the full phone number with area code, no dashes. I tried using Outlook to send an SMS and it does work. I tried using just the number on the command line and it didn't work.
@scasey....Yes mobile number is 10 digits, no spaces or dashes. The email does get to the recipient email when executed. I don't understand what you mean by this:

As 273 asked, can you ping/traceroute to vtext.com from your mail server? If you mean typing in command prompt "ping mobilenumber@vtext.com" I tried it, got an error "Ping request could no find host MOBILENUMBER"

I used a GUI email application (Outlook) and it works to an email and to a mobile number.
 
Old 06-26-2017, 10:14 AM   #26
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,555

Rep: Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598
Obviously, there is something that Powershell is sending to the outlook server versus mail.
 
Old 06-26-2017, 11:50 AM   #27
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.8.2003
Posts: 5,228

Rep: Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915
Quote:
Originally Posted by trickydba View Post
@273...yes it is in the corporate environment and I am using the same SMTP server used in other working scripts.
@michaelk... yes I am using the full phone number with area code, no dashes. I tried using Outlook to send an SMS and it does work. I tried using just the number on the command line and it didn't work.
@scasey....Yes mobile number is 10 digits, no spaces or dashes. The email does get to the recipient email when executed. I don't understand what you mean by this:

As 273 asked, can you ping/traceroute to vtext.com from your mail server? If you mean typing in command prompt "ping mobilenumber@vtext.com" I tried it, got an error "Ping request could no find host MOBILENUMBER"

I used a GUI email application (Outlook) and it works to an email and to a mobile number.
The ping command would be
Code:
ping vtext.com
one pings a domain, not an email address.

Did you try either:
1) mailx to the mobile number address only? or
2) separating the email addresses with a comma?

Outlook is likely (probably) not using the same email server as mailx. mailx would use sendmail or some other MTA on the server itself. Outlook in a corporate environment is probably using a MS mail server. Is your 'recipient@email.com' also outside your corporate network? If not, try an email address that is and see if that works.

What does your ~/.mailrc contain? That's where mailx is going to get information about the mail server.

Last edited by scasey; 06-26-2017 at 11:59 AM.
 
Old 06-26-2017, 12:44 PM   #28
trickydba
Member
 
Registered: Nov 2016
Location: Atlanta,Georgia
Posts: 310

Original Poster
Rep: Reputation: Disabled
@scasey.... I tried pinging "vtext.com" with 100% loss, request timed out. I tried 1 & 2 with no progress. I tried using email inside and outside the corporate network with no progress. Sending to an email outside the network I haven't received an email yet but remember, sending the emails is not the problem, I'm trying to send a SMS to a phone,
 
Old 06-26-2017, 01:11 PM   #29
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,585

Rep: Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350Reputation: 2350
Quote:
Originally Posted by trickydba View Post
...sending the emails is not the problem...
Sending the emails is the problem or, at least, you have not proven it is not.
Your problem seems to be that email sent from your Linux install to a specific address either fail or are in a format that it does not accept.
I am wondering what credentials you present to the exchange server and what credentials iot presents to the text gateway -- surely this isn't an open relay that anyone can email and send a text for free?
 
Old 06-26-2017, 01:33 PM   #30
trickydba
Member
 
Registered: Nov 2016
Location: Atlanta,Georgia
Posts: 310

Original Poster
Rep: Reputation: Disabled
I'm thinking Im sending both the same
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Sockets with linux, how to send same text string to all connected clients c/c++ Mogget Programming 9 05-18-2010 04:48 AM
in Pascal: how to exec a program, discard text output or send to text file Valkyrie_of_valhalla Programming 6 05-02-2007 09:50 AM
How do I use Linux POST command to send text to remote server Bill K Linux - General 1 05-19-2006 09:26 PM
Send text message from windows to linux ok goutham_v Linux - General 3 04-18-2004 01:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration