MailServer in php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • realin
    Contributor
    • Feb 2007
    • 254

    MailServer in php

    hi guys,

    i just want to know that if there is a way to setup mailserver in php ?
    I mean i want the script or application to send/receive mails, notify bounce or not received information..

    If this application is not possible in pHp, then how can i do this ?

    please tell me
    thanks and regards
    Realin !
  • TheServant
    Recognized Expert Top Contributor
    • Feb 2008
    • 1168

    #2
    Originally posted by realin
    hi guys,

    i just want to know that if there is a way to setup mailserver in php ?
    I mean i want the script or application to send/receive mails, notify bounce or not received information..

    If this application is not possible in pHp, then how can i do this ?

    please tell me
    thanks and regards
    Realin !
    Sending is easy. just the php mail() function. The rest need a server type platform I believe. So I have no idea how to do that. How I understand mail works is when you send a mail (easy) it goes to a server (the host of the domain), which can treat everything accordingly. The server send it then to an amount of space which your computer downloads from, which is why you don't have to be online all the time to avoid losing emails. However the server must be online all the time so that it can let the sender know - Yes I have received your mail and I have sent it to the person who you sent it to, and they should get it next time they download.

    Again, I have never done it, nor even thought about it, but it would be a lot easier to use your website host's server (most have a mail system anyway). Otherwise you need to get a server, and make sure it is always on and then you will need someone else, as that is way beyond me. Hope that helps.

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      Hi.

      Sending mail in PHP is easy. Just use the mail function, or even one of the free classes, such as PHPMailer or Swift.

      Receiving mail is not something you *should* do with PHP. It may be technically possible, but it would probably require some hacking and setting up various cron jobs,possibly setting up and monitoring ports on your server and other such nasty stuff. All of which is heavily OS dependent and boring.

      An easier solution... If you have access to your server, you can probably set it up as a mail server. Then, depending on your server type and configuration, your mail would most likely be put in a folder somewhere, where you could have your PHP read it.

      Comment

      • realin
        Contributor
        • Feb 2007
        • 254

        #4
        Originally posted by Atli
        Hi.

        Sending mail in PHP is easy. Just use the mail function, or even one of the free classes, such as PHPMailer or Swift.

        Receiving mail is not something you *should* do with PHP. It may be technically possible, but it would probably require some hacking and setting up various cron jobs,possibly setting up and monitoring ports on your server and other such nasty stuff. All of which is heavily OS dependent and boring.

        An easier solution... If you have access to your server, you can probably set it up as a mail server. Then, depending on your server type and configuration, your mail would most likely be put in a folder somewhere, where you could have your PHP read it.

        how do i setup mailserver? and how do i ask PHP to read from it ?
        how does mailman do it ? its in python no ?
        does mailman read it or what ? cause we dont have to setup anything for it ...
        please help thanks :)

        Comment

        • aktar
          New Member
          • Jul 2006
          • 105

          #5
          I have a question: how can you retrieve your mail from the mail server?

          Comment

          • realin
            Contributor
            • Feb 2007
            • 254

            #6
            Originally posted by aktar
            I have a question: how can you retrieve your mail from the mail server?
            hiya,

            well you can do that using a simple php class. .
            here is quick link for the procedure which i followed, you will get lotsa result on google though

            Phpit

            regards
            Realin !

            Comment

            • ronverdonk
              Recognized Expert Specialist
              • Jul 2006
              • 4259

              #7
              Thank you for the information. I guess that will help a lot of viewers who are not familiar with the mail concept.

              Ronald

              Comment

              • TheServant
                Recognized Expert Top Contributor
                • Feb 2008
                • 1168

                #8
                Very Nice! I could actually use this in a very good way. Thanks realin!

                Comment

                Working...