send sms from access to a mobile

Posted on 2009-12-18
Last Modified: 2012-06-27
I need to send sms messages from access to a mobile
Question by:M_SOLAIMAN
    LVL 12

    Assisted Solution

    LVL 7

    Accepted Solution


    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:
    Virgin Mobile:

    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 & ""
    objmessage.To = Me.tbTo
    objmessage.TextBody = Me.tbTextBody '"This is some sample message text."
     objmessage.Configuration.Fields.Item _
    ("") = 2
    'Name or IP of Remote SMTP Server
    'Type of authentication, NONE, Basic (Base64 encoded), NTLM
    objmessage.Configuration.Fields.Item _
    ("") = 1
    'Your UserID on the SMTP server
    objmessage.Configuration.Fields.Item _
    ("") = Me.tbGmailLogin
    'Your password on the SMTP server
    objmessage.Configuration.Fields.Item _
    ("") = Me.tbPassword
    objmessage.Configuration.Fields.Item _
    ("") = ""
    'Server port (typically 25)
    objmessage.Configuration.Fields.Item _
    ("") = 465
    'Use SSL for the connection (False or True)
    objmessage.Configuration.Fields.Item _
    ("") = True
    'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
    objmessage.Configuration.Fields.Item _
    ("") = 30
    Set objmessage = Nothing
    'Call MsgBox("E-mail sent via Gmail SMTP", vbInformation, Application.Name)
    End Sub

    Open in new window


    Author Comment

    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.
    LVL 7

    Expert Comment

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

    What is your mobile provider?

    Author Comment

    my mobile provider is saudi telecom
    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 - <> (state 14).

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

    Received: by with SMTP id 5mr2948242fai.88.1261676633751;
           Thu, 24 Dec 2009 09:43:53 -0800 (PST)
    Return-Path: <>
    Received: from alkasbar41787a ([])
           by 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: <>
    To: <>
    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

    LVL 7

    Expert Comment

    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.

    Author Closing Comment

    thank you very much

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
    It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

    779 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