Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 21. Nov 2024, 23:39

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 15. May 2006, 16:36 
Offline

Joined: 15. May 2006, 16:29
Posts: 1
When trying to subscribe email address that is in gmail, you get an errormessage that says email address is not valid.

This is because email validation checks if it can make a connection to www + domain in address, and gmail.com is not valid address because it only redirects you to mail.google.com

With a quick workaround to email.inc.php this can be avoided, but is there any other way to check validation to domain in email address?

Code:
function testEmailDomain($email)
{
    global $test_email_by_checking_url;

    if ($test_email_by_checking_url)
        $handle = @fopen ("http://www.google.de/", "r");
    if ($handle == false) {
        // no connection - we skip the real test
        return true;
    } else {
       // Added a support to Gmail addresses.
        $domain = "" . substr(strstr($email, '@'), 1);
        if ($domain == "gmail.com"){
           return true;
        }
        // we do the test!
        $domain = "http://www." . substr(strstr($email, '@'), 1);
        $handle = @fopen ($domain, "r");
        if ($handle == false) {
            // no connection - we skip the real test
            return false;
        }
    }
    // email domain is good :)
    return true;
}


Top
 Profile  
 
 Post subject:
PostPosted: 15. May 2006, 17:54 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
sure

just set
$test_email_by_checking_url=true;
to
$test_email_by_checking_url=false;

in the config or add (if you have TWG admin 0.91)

$test_email_by_checking_url=false;
to the additional tab in TWG Admin -> Configuration

/Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 28 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy