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.

Recommended Answers

All 4 Replies

Member Avatar for diafol

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.

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

Member Avatar for diafol

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.