Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 722
  • Last Modified:

send sms from access to a mobile

I need to send sms messages from access to a mobile
Mohammad Alsolaiman
Mohammad Alsolaiman
  • 3
  • 3
2 Solutions

IMHO the simplest way to do that is to use E-mail.
You must know who is the provider of your recipient's cell.
Then you can send an email using kind of following format:
T-Mobile: phonenumber@tmomail.net
Virgin Mobile: phonenumber@vmobl.com
Cingular: phonenumber@cingularme.com
Sprint: phonenumber@messaging.sprintpcs.com
Verizon: phonenumber@vtext.com
Nextel: phonenumber@messaging.nextel.com

Refer to provider's website for exact syntax.

Below is an example to send E-mail from Access form using Gmail account

Hope this helps
Private Sub btSend_Click()
'original code by westconn1

Set objmessage = CreateObject("CDO.Message")
objmessage.Subject = Me.tbSubject
objmessage.From = Me.tbGmailLogin & "@gmail.com"
objmessage.To = Me.tbTo
objmessage.TextBody = Me.tbTextBody '"This is some sample message text."
 objmessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'Name or IP of Remote SMTP Server
'Type of authentication, NONE, Basic (Base64 encoded), NTLM
objmessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
'Your UserID on the SMTP server
objmessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = Me.tbGmailLogin
'Your password on the SMTP server
objmessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = Me.tbPassword
objmessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
'Server port (typically 25)
objmessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
'Use SSL for the connection (False or True)
objmessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
objmessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 30
Set objmessage = Nothing

'Call MsgBox("E-mail sent via Gmail SMTP", vbInformation, Application.Name)

End Sub

Open in new window

Mohammad Alsolaimanapplication programmerAuthor Commented:
if i put any available email it works good
but if i put my mobile No 0503154849 or 009665031548498
i have this err:
The server rejected the address or addresses more than one recipient, and the server response 5535.1.2 or the other punctuation after the recipient's email address.
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

As I said, you must check with your mobile provider for correct Email syntax..
The address should look type of: 0503154849@YourMobileProvider.com

What is your mobile provider?
Mohammad Alsolaimanapplication programmerAuthor Commented:
my mobile provider is saudi telecom www.stc.com.sa
i have this error message
Delivery to the following recipient failed permanently:


Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 550 550 Mailbox unavailable or access denied - <0503154849@stc.com.sa> (state 14).

----- Original message -----

Received: by with SMTP id 5mr2948242fai.88.1261676633751;
       Thu, 24 Dec 2009 09:43:53 -0800 (PST)
Return-Path: <m.solmn@gmail.com>
Received: from alkasbar41787a ([])
       by mx.google.com with ESMTPS id 1sm7804437fks.59.2009.
       (version=SSLv3 cipher=RC4-MD5);
       Thu, 24 Dec 2009 09:43:52 -0800 (PST)
Thread-Topic: =?windows-1256?B?yszRyMk=?=
thread-index: AcqEwLHmsZfdh6aVT7uXulRtGf2+lA==
From: <m.solmn@gmail.com>
To: <0503154849@stc.com.sa>
Subject: =?windows-1256?B?yszRyMk=?=
Date: Thu, 24 Dec 2009 20:44:09 +0300
Message-ID: <000001ca84c0$b21a8470$6401a8c0@alkasbar41787a>
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
X-Mailer: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350

I'd advice you to contact your provider directly and ask them if they provide receiving sms from email.
If yes, they must give you exact syntax of Email address of your phone.
It can be not exactly as you phone number, but say +966503154849@...

Sometimes such service needs to be activated separately.
I'm not able to check it, because their site require registration.
Mohammad Alsolaimanapplication programmerAuthor Commented:
thank you very much

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now