954,587 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to deny custom email id in php mail form?

Hello guys,

I am using php mail form where visitors contact with the registered site members.
Searching for a solution to avoid unwanted spam messages.

Is there a way to put in code which deny sending messages from custom mail ids?

Thanks in advance.


Using this post to great thank once again to @mmartinho for the previous help.

Tigermes
Newbie Poster
10 posts since Apr 2010
Reputation Points: 10
Solved Threads: 0
 

Firstly you need to add strong captcha to your form.
Then check this link for checking of email address.
http://www.webdigi.co.uk/blog/2009/how-to-check-if-an-email-address-exists-without-sending-an-email/smtpvalidateclassphp/

vibhaJ
Posting Shark
931 posts since Apr 2010
Reputation Points: 161
Solved Threads: 183
 

Users can't sign up your site without activating their account via the email address they supplied. SO you can't send a message if you haven't activated your account.
Users can decide whether to accept emails directly from your site. You can't send a message to an user who doesn't want to accept them.
All emails should have 'from field' based on your domain - NOT the address of the sender (user)). You are responsible for formmail.

Keep a log of messages sent - sender_id | recipient_id | timestamp - don't keep copy of content, unless you tell everybody that a copy will be kept. In the event of a complaint, you can check the log and ban / delete an user. Keeping copies can get heavy - especially if they contain attachments.

Use captcha YES.

diafol
Rhod Gilbert Fan (ardav)
Moderator
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
 

Ok, thanks for your time. Let me tell what's my exact idea.
Yes, you are right, registered users had verified their emails during the registration.
Messages through the site are usually send by non registered - visitors. What they deal is not my business.
My idea is to block for example [email]goro@gmail.com[/email], [email]feedbanks@yahoo.com[/email], and so on to send any kind of messages through site's send_mail.php. This guys are well known spammers, and regularly sending fake deals.
Hope this gives you more details.

Thanks

Tigermes
Newbie Poster
10 posts since Apr 2010
Reputation Points: 10
Solved Threads: 0
 
Messages through the site are usually send by non registered - visitors. What they deal is not my business.

Be very careful, you could be providing malicious users with a facility to anonymously send spam. You'll get fingered for it if they provide a false email.

Depending on your site usage, you could be up to your neck in spam pushers.

diafol
Rhod Gilbert Fan (ardav)
Moderator
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: