Results 1 to 6 of 6

Thread: Questions on POP3/Incoming messaging?

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2013
    Posts
    56

    Question Questions on POP3/Incoming messaging?

    Alright, im new to the whole SMTP/POP3/IMAP4 stuff, I really only attempted SMTP twice (first failure, second success), and Pop3, about a hour ago for the first time.

    Now, I know theres a way to do this, because I remember a while ago I saw programmers do this before.

    I want to initially have my computer receive text messages from my phone.

    But I need a POP3 server, user, password, port, and SSL check.

    So, my first question:
    How would I get my phones POP3 server, or use something like pop3.live.com (for Windows Live for example) to eventually, get messages from my phone?

    My second question:
    After my phone email (whatever, it may be: +CountryCode##########@TypeAndProvider.WhateverTheProvidersPrefexIs), would there be a password? (I assume not, because for my phone to receive a text it would require me to have to set up a password long ago, correct?)

    My third question:
    I already know how to SEND messages from my computer to a cell phone, but, now, how do I RECEIVE messages from a cell phone to my computer? Im really lost by POP3, all the examples iv seen, I get the code... But I still dont understand how its working, where its getting the source from, etc...

    Heres one of the example codes I have that works:

    Code:
    Imports System.IO
    Imports EAGetMail
    'Code from http://www.emailarchitect.net/eagetmail/sdk/html/object_usage.htm VB Version -- NOT mine.
    
    
        Public Sub ReceiveMail( _
        ByVal sServer As String, _
        ByVal sUserName As String, _
        ByVal sPassword As String, _
        ByVal bSSLConnection As Boolean)
            Dim oClient As New MailClient("TryIt")
    
            'To receive email from imap4 server, please change
            'ServerProtocol.Pop3 to ServerProtocol.Imap4 in MailServer constructor
    
            'To receive email with Exchange Web Service, please change
            'ServerProtocol.Pop3 to ServerProtocol.ExchangeEWS to MailServer constructor
    
            'To receive email with Exchange WebDAV, please change
            'ServerProtocol.Pop3 to ServerProtocol.ExchangeWebDAV to MailServer constructor
    
            'Exchange Server supports POP3/IMAP4 protocol as well, but in Exchange 2007
            'or later version, POP3/IMAP4 service is disabled by default. If you don't want to use POP3/IMAP4
            'to download email from Exchange Server, you can use Exchange Web Service (Exchange 2007/2010 or
            'later version) or WebDAV (Exchange 2000/2003) protocol.
    
            'For Exchange Web Service/WebDAV, please ignore 
            'Port property. But for Exchange Web Service, please set SSLConnection to True
    
            Dim oServer As New MailServer(sServer, _
                sUserName, sPassword, bSSLConnection, _
                ServerAuthType.AuthLogin, ServerProtocol.Pop3)
    
            'by default, the pop3 port is 110, imap4 port is 143, 
            'the pop3 ssl port is 995, imap4 ssl port is 993
            'you can also change the port like this
            'oServer.Port = 110
            Try
                oClient.Connect(oServer)
                Dim infos() As MailInfo = oClient.GetMailInfos()
                Dim count As Integer = infos.Length
                For i As Integer = 0 To count - 1
                    Dim info As MailInfo = infos(i)
                    Dim oMail As Mail = oClient.GetMail(info)
                    ''Save mail to local    file
                    oMail.SaveAs(String.Format("c:\Inbox\{0}.eml", i), True)
                Next
    
                For i As Integer = 0 To count - 1
                    Dim info As MailInfo = infos(i)
                    oClient.Delete(info)
                Next
                '
                ' Delete method just mark the email as deleted, 
                ' Quit method pure the emails from server exactly.
                oClient.Quit()
    
            Catch ep As MailServerException
                ''Message contains the information returned by mail server
                Console.WriteLine("Server Respond: {0}", ep.Message)
            Catch ep As System.Net.Sockets.SocketException
                Console.WriteLine("Socket Error: {0}", ep.Message)
            Catch ep As Exception
                Console.WriteLine("System Error: {0}", ep.Message)
            End Try
    
            oClient.Close()
        End Sub
    In my Form_Load, I just call RecieveMail and (right now) use my default "localhost" credentials and it works fine. I can have a friend send me a message to my email from either a computer or phone, ill get it... But I want it from my phone number (example): 123-456-7890 that my friend could text me with, instead of having to enter my email address to send me a message.

  2. #2
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,532

    Re: Questions on POP3/Incoming messaging?

    direct messaging (via a phone number 123-456-7809) isn't the same as sending an email. Text messaging is done via SMS - System Messaging Service... so there isn't a POP3 or SMTP server or any mailing service involved. The two systems don't really talk to each other.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2013
    Posts
    56

    Re: Questions on POP3/Incoming messaging?

    Oh... Well would you be able to point me to a resource to learn about SMS send/receive programitcally?

  4. #4
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,532

    Re: Questions on POP3/Incoming messaging?

    Me? Personally, no I couldn't. Not my area of experience. There are others that may be able to help. You could try searching the forums for SMS, see what pops up.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5

    Thread Starter
    Member
    Join Date
    Jul 2013
    Posts
    56

    Re: Questions on POP3/Incoming messaging?

    Alright, thanks for the information

  6. #6
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,123

    Re: Questions on POP3/Incoming messaging?

    Try searching for AT commands.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width