t.zak510 Posted June 24, 2019 Share Posted June 24, 2019 (edited) Hello, I have a template which contains a form with the following code to send email but I'm not receiving any emails because it doesn't use send::mail function, here is the code: <?php $name = @trim(stripslashes($_POST['name'])); $from = @trim(stripslashes($_POST['email'])); $subject = @trim(stripslashes($_POST['subject'])); $message = @trim(stripslashes($_POST['message'])); $to = '[email protected]'; //replace with your email $headers = array(); $headers[] = "MIME-Version: 1.0"; $headers[] = "Content-type: text/plain; charset=iso-8859-1"; $headers[] = "From: {$name} <{$from}>"; $headers[] = "Reply-To: <{$from}>"; $headers[] = "Subject: {$subject}"; $headers[] = "X-Mailer: PHP/" . phpversion(); mail($to, $subject, $message, $headers); die; How can I fix it please Edited June 24, 2019 by t.zak510 (see edit history) Link to comment Share on other sites More sharing options...
musicmaster Posted June 25, 2019 Share Posted June 25, 2019 Nowadays spamfilters are very aggressive. Hosting providers take care of this but if you are self hosting (VPS, etc) and taking care of your own email things can be really tough. Things have changed a lot in the past few years. Link to comment Share on other sites More sharing options...
t.zak510 Posted June 25, 2019 Author Share Posted June 25, 2019 I need a solution brother, I have plans to stop spammers as I will add filters, but I need to receive an email first before doing anything else Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now