php script to check valid Email in sql DB?

Started by larry007, January 08, 2021, 06:38:02 AM

Previous topic - Next topic

larry007

Hi

Is it possible to write a php script which checks the email addresses in the SMF 2.017 sql database for validity?

Thank you


Aleksi "Lex" Kilpinen

Probably yes, but I'm wondering why - SMF should validate the address formats already as far as I know, so no obviously invalid addresses should be there to begin with.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

GigaWatt

Maybe to validate email addresses of members no longer active on the forum ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

vbgamer45

Email verification is trickey. You can validate on the syntax, dns records. 
Beyond on that you have to email the user and see if a bounceback occurs.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

larry007

Quote from: GigaWatt on January 08, 2021, 11:03:19 AM
Maybe to validate email addresses of members no longer active on the forum ;).

that's exactly why i am asking

Aleksi "Lex" Kilpinen

Quote from: larry007 on January 08, 2021, 11:15:50 AM
Quote from: GigaWatt on January 08, 2021, 11:03:19 AM
Maybe to validate email addresses of members no longer active on the forum ;).

that's exactly why i am asking
That is fairly impossible to do without sending everyone an email and seeing if it goes through.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

larry007

Is there another way to check the email addresses for validity

shadav


Aleksi "Lex" Kilpinen

Quote from: larry007 on January 08, 2021, 11:23:56 AM
Is there another way to check the email addresses for validity
No, not really. There's no public directory to check against.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

vbgamer45

Yes and some mailservers will not respond back if an email address is valid or not due to spam issues.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

shawnb61

Under most circumstances, you can view the forum's returned mail on your host...  That's one good source of invalid emails.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

larry007

Quote

you can try these mods

https://custom.simplemachines.org/mods/?mod=4163

https://custom.simplemachines.org/mods/?mod=3849

I've already looked at the mods.

To first link: in principle, you can only set the deletion of users who have not been online for a long time, or users who have not activated themselves.

To second link: that only works if the email addresses are valid

larry007

maybe you could export the email addresses from the sql db and possibly have them checked for validity in another external program.

but whether there is something like that, I don't know

shadav

Quote from: larry007 on January 08, 2021, 11:33:10 AM
Quote

you can try these mods

https://custom.simplemachines.org/mods/?mod=4163

https://custom.simplemachines.org/mods/?mod=3849

I've already looked at the mods.

To first link: in principle, you can only set the deletion of users who have not been online for a long time, or users who have not activated themselves.

To second link: that only works if the email addresses are valid

I'd assume valid or not it would still work....after the email is sent the user has x days to respond/log in....if they do not then the system removes them

other than that maybe the antispam mods that use honeypot and other services to check people's usernames, ips, and emails when registering?

Aleksi "Lex" Kilpinen

Those are all fairly good options to prune invalid contacts, but there's really no perfect solution available.
Quote from: larry007 on January 08, 2021, 11:40:38 AM
maybe you could export the email addresses from the sql db and possibly have them checked for validity in another external program.

but whether there is something like that, I don't know
There are "solutions" like this, but can't really recommend going that way. They work by mailing, and catching mail server responses - in other words, spamming.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

larry007

I think then this mod seems to me the most suitable

https://custom.simplemachines.org/mods/?mod=3849

thank you for the comments

Advertisement: