Is your issue that someone is spamming your web form?
How can I stop email sender on my website
I keep on getting more emails on my website and sometimes from the same email, I need some ideas on how I can limit those email senders on my website or keep them away from my site am getting frustrated with everyday emails, I want also to add an AI that can be responding to my customers when am not available. my website is made in laravel 8. please I need your ideas.
@automica tell me how to fix it then let me show you my codes and you can tell me what I can add on
<!-- contact section -->
<div id="fh5co-contact" class="section section-contacts" data-section="contact">
<div class="container">
<div class="row">
<div class="col-md-9 col-md-offset-2 section-heading">
<h2 class="fh5co-section-title text-center">Contact Us</h2>
<p class="text-center">
Divide details about your product or agency work into parts. Write a few lines about each one and contact us about any further collaboration. We will responde get back to you in a couple of hours.
</p>
@if (session('success'))
<div class="alert alert-dismissable alert-success" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
{{ session('success') }}
</div>
@endif
<form enctype="multipart/form-data" method="POST" action="{{ route('contact') }}" class="contact-form">
@csrf
<div class="row">
<div class="col-md-6">
@guest
<div class="form-group">
<label class="bmd-label-floating">Your Name</label>
<input id="customer_name" type="text" name="customer_name" class="form-control @error('customer_name') is-invalid @enderror" value="" placeholder="Full Name..." require="" autocomplete="customer_name">
@error('customer_name')
<span class="invalid-feedback" role="alert" style="margin-left: 20px; margin-bottom: -10px">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
@else
<div class="form-group">
<label class="bmd-label-floating">Your Name</label>
<input id="customer_name" type="text" name="customer_name" class="form-control input-info @error('customer_name') is-invalid @enderror" placeholder="Full Name..." value="{{ Auth::user()->name }}" require="" autocomplete="customer_name">
@error('customer_name')
<span class="invalid-feedback" role="alert" style="margin-left: 20px; margin-bottom: -10px">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
@endguest
</div>
<div class="col-md-6">
@guest
<div class="form-group">
<label class="bmd-label-floating">Your Email</label>
<input id="customer_email" type="email" name="customer_email" class="form-control @error('customer_email') is-invalid @enderror" value="" placeholder="Email..." require="" autocomplete="customer_email">
@error('customer_email')
<span class="invalid-feedback" role="alert" style="margin-left: 20px; margin-bottom: -10px">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
@else
<div class="form-group">
<label class="bmd-label-floating">Your Email</label>
<input id="customer_email" type="email" name="customer_email" class="form-control @error('customer_email') is-invalid @enderror" placeholder="Email..." value="{{ Auth::user()->email }}" require="" autocomplete="customer_email">
@error('customer_email')
<span class="invalid-feedback" role="alert" style="margin-left: 20px; margin-bottom: -10px">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
@endguest
</div>
<div class="col-md-12">
@guest
<div class="form-group">
<label class="bmd-label-floating">Your Phone</label>
<input id="customer_phone" type="number" name="customer_phone" class="form-control @error('customer_phone') is-invalid @enderror" value="" placeholder="(+1) 123 4567 8910" require="" autocomplete="customer_phone">
@error('customer_phone')
<span class="invalid-feedback" role="alert" style="margin-left: 20px; margin-bottom: -10px">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
@else
<div class="form-group">
<label class="bmd-label-floating">Your Phone</label>
<input id="customer_phone" type="number" name="customer_phone" class="form-control input-info @error('customer_phone') is-invalid @enderror" placeholder="(+1) 123 4567 8910" value="{{ Auth::user()->phone }}" require="" autocomplete="customer_phone">
@error('customer_phone')
<span class="invalid-feedback" role="alert" style="margin-left: 20px; margin-bottom: -10px">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
@endguest
</div>
</div>
<div class="form-group">
<label for="exampleMessage" class="bmd-label-floating">Your Message</label>
<textarea id="message" type="text" name="message" class="form-control @error('message') is-invalid @enderror" placeholder="Message..." rows="4" require=""></textarea>
@error('message')
<span class="invalid-feedback" role="alert" style="margin-left: 20px; margin-bottom: -10px">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="row">
<div class="col-md-3 ml-auto mr-auto">
<button type="submit" class="btn-vain">
Send Message
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- contact section -->
Where do you get these emails? On the website? Or rather a mailbox like Gmail?
@Sinnbeck no it's not on Gmail or a mailbox it's on my website
@niyo you are not explaining what you are talking about so no one can help you
@niyo Elaborate
@Snapey Am saying that I keep on getting messages from the same email, they keep on sending the same email to my website
@Tray2 do you want my controller, routes, and everything or I give you the link and see the website
@niyo Do you mean they keep registering as users?
Do they keep sending contact form?
What????
We have no idea what your website does
@Snapey It's a business website and people are not required to create an account to send an email
@niyo STILL NOT TELLING US THE PROBLEM
@niyo No, I meant that you should elaborate (explain more in depth) what your issue is.
- How are they sending you mail?
- Where are the mail sent?
- and so on.
@niyo let's try an assumption. There is a public form, and some spam bot keep using it to send emails. In that case you can use recaptcha
@Tray2 @snapey maybe am using the term email and making it so confusing, the question is how can I limit people who send messages on my contact us page (an example: like when you try to create an account on any website and they tell you this username already exist in our database) then I can tell them that their message already exists.
@niyo So the way to stop form spam is to install a recaptcha service or a honeypot. If its not automated spam then you can store the contact request in a table and then check if you already have any entry in that table from that email address. Then provide a polite reply.
Alternatively, create a blacklist table and if they are on that blacklist, just silently drop their request.
@niyo Check this article:
$check_email_exists = \App\Models\User::where('email'','[email protected]')->exists();
$check_email_exists it returns true or false based on status u can check!!
thanks, y'all for your help
Please or to participate in this conversation.