Jump to content

Using getmxrr function


Germaris

Recommended Posts

Hi there!

 

In a registration form, I have an input field for entering the email address.

How do I use, in the verification process of the form, the getmxrr function to verify if the proposed email address really exists?

 

Many thanks in advance for any help!

Link to comment
Share on other sites

Oh. yes, 25. : )

 

Here is an example of what I mean by using fsockopen to check the mail server,

<?php
// $Email will be the email address.

  function CheckEmail($Email)
  {
      if (empty($Email)) {
          return false;
      } else {
          list($UserEmail, $MailServer) = explode('@', $Email);
          unset($UserEmail);
          $Connection = fsochopen($MailServer, 25, $errno, $errstr, 30);
          if (empty($Connection)) {
              echo 'The email address you entered is not valid.';
              return false;
          } else {
              return true;
          }
      }
?>/code]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.