Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7014663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:33:02+00:00 2026-05-27T22:33:02+00:00

I have a form on my page and the information I submit keeps going

  • 0

I have a form on my page and the information I submit keeps going to my junk folder within my Hotmail email.

I’m not sure what to do I keep changing the headers but the mail still keeps coming into my junk folder.

The code for the PHP is:

    <?php
$boundary = uniqid('np');

$field_name = $_POST['cf_name'];
$field_email = $_POST['cf_email'];
$field_message = $_POST['cf_message'];

$mail_to = 'user@hotmail.co.uk';


$body_message = 'From: '.$field_name."\n";
$body_message .= 'E-mail: '.$field_email."\n";
$body_message .= 'Message: '.$field_message;


$headers = "MIME-Version: 1.0\r\n";
$headers .= "X-Mailer: PHP's mail() Function\n";
 $headers .= "Content-Type: multipart/alternative;boundary=" . $boundary . "\r\n";
 $headers .= "Subject: Contact\r\n";


$message = "This is a MIME encoded message."; 

 $message .= "\r\n\r\n--" . $boundary . "\r\n";
 $message .= "Content-type: text/plain;charset=utf-8\r\n\r\n";
 $message .= "This is the text/plain version.";

 $message .= "\r\n\r\n--" . $boundary . "\r\n";
 $message .= "Content-type: text/html;charset=utf-8\r\n\r\n";
 $message .= "This is the <b>text/html</b> version.";

 $message .= "\r\n\r\n--" . $boundary . "--";



$mail_status = mail($mail_to, $subject, $body_message, $headers);

if ($mail_status) { ?>
    <script language="javascript" type="text/javascript">
        alert('Thank you for the message. I will contact you shortly.');
        window.location = 'http://www.user.com';
    </script>
<?php
}
else { ?>
    <script language="javascript" type="text/javascript">
        alert('Message failed. Please, send an email to user@hotmail.co.uk');
        window.location = 'url';
    </script>
<?php
}
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:33:03+00:00Added an answer on May 27, 2026 at 10:33 pm

    One possible problem is if the smtp server from which you are sending the emails, doesn’t match the “from” email.

    For example if you fill the from field with “yourmail@gmail.com” and the smtp server is not the gmail’s one, this might be marked as spam by some mail providers. Unfortunately, there is nothing you can do about it, besides from sending emails from your own domain, that resolves to your smtp server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form on an HTML page with multiple submit buttons that perform
I have a form in an HTM page that, after pressing the submit button,
I have a simple form on a page and I want to auto submit
I have a form on a non-SSL page that I want to submit as
I have a form on the following page: http://mmicet.yazminmedia.com/qseries (Click the Keep me updated
Here is the site. I have the submit page, and a form action to
I have web form in which I have to make sure that 'SUBMIT' button
I have an ASP.NET page with a simple form and a submit button. Upon
I have a form page in PHP that reads a DBF, and conditionally converts
I have a form on a page where the user has inputs to edit

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.