We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,549 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

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.

3
Contributors
4
Replies
5 Hours
Discussion Span
1 Year Ago
Last Updated
5
Views
Tigermes
Newbie Poster
13 posts since Apr 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 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
958 posts since Apr 2010
Reputation Points: 161
Solved Threads: 190
Skill Endorsements: 3

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
Keep Smiling
Moderator
10,611 posts since Oct 2006
Reputation Points: 1,628
Solved Threads: 1,506
Skill Endorsements: 57

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 goro@gmail.com, feedbanks@yahoo.com, 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
13 posts since Apr 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 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
Keep Smiling
Moderator
10,611 posts since Oct 2006
Reputation Points: 1,628
Solved Threads: 1,506
Skill Endorsements: 57

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.3433 seconds using 2.73MB