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 8960627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:42:06+00:00 2026-06-15T15:42:06+00:00

I got a contact form that succesfully sends emails to me. heres the extract:

  • 0

I got a contact form that succesfully sends emails to me.

heres the extract:

$_POST['message'] = wordwrap($_POST['message'], 70);
mail ('myemail@test.com', $_POST['subject'], $_POST['message'] , $_POST['email']);
echo "<div class='registertext'>Your email was succesfully sent to a member of the administration team. Please wait 24 hours for as to reply and ensure you check your junk mail!<br />To login please click <a href='login.php'>here</a></div>";

The issue I have is, the email gets sent from my host. Not a email I want to specify. How would I overcome this?

  • 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-06-15T15:42:07+00:00Added an answer on June 15, 2026 at 3:42 pm

    You can specify it in the email headers:

    $recipient = "recipient@test.com";
        $from      = "You@yoursite.com";
        $replyTo   = "You@yoursite.com";
        $subject   = "Hi!";
        $text      = "<p>This is a test!<p>";
    
        $headers = "MIME-Version: 1.0\r\n"
          ."Content-Type: text/html; charset=utf-8\r\n"
          ."Content-Transfer-Encoding: 8bit\r\n"
          ."From: =?UTF-8?B?". base64_encode([Your Name]) ."?= <$from>\r\n"
          ."Reply-To: $replyTo\r\n"
          ."X-Mailer: PHP/". phpversion();
    
        //send it!
        if (mail($recipients, $subject, $text, $headers, "-f $from")){
            echo "sent";
            } else {
               echo "did not send";
            };
    

    but there’s a good chance it will get caught be SPAM filters. Your best bet in this case would be to use a PHP mailing library that handles SMTP emailing and uses your actual account to send mail (there are several packages that can handle this for you: Pear Mail, and PHP Mailer amongst others.

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

Sidebar

Related Questions

I have a contact form that sends to my email and I recently got
Ive got a contact form that isnt sending but is outputting that the message
I've got a basic HTML/JavaScript contact form that HostGator provided. It works pretty well...if
I've got a container that has a contact form in it.. the form is
I've got a WordPress site with a contact form that works fine on my
I've got my contact form hidden with a negative margin-top, so that when the
I've got a form that contains contact info. Each has a type, and then
I've got a basic PHP contact form and have it process.php file that checks
Ahoy all. I've got a contact form PHP script. I use it for multiple
I've got this php code to send the users information from the contact form

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.