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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:07:41+00:00 2026-06-08T04:07:41+00:00

I searched this topic but there wasn’t anything useful for me. CODE: public function

  • 0

I searched this topic but there wasn’t anything useful for me.

CODE:

public function sendActivation($name, $user, $pass, $activationKey)
{
    $to = $user;
    $subject = 'Account Activation';
    $headers = "From: noreply@domain.tld\r\n";
    $headers .= "MIME-Version: 1.0\r\n";
    $headers .= "Content-Type: text/html; charset=UTF-8\r\n";
    $message = "<div id='mail' style='height: auto; width: 500px;background-color: #DDDDDD; font-family: Tahoma, Arial, sans-serif;'>
    <p>Hello dear $name and thanks for your choise!</p>
    <p>Your details:</p>
    <p>Username: $user</p>
    <p>Password: $pass</p>
    <p><br /></p>
    <p>Here there is an activation link. Please click on it to activate your account.
    If you don't activate your account in next 24 hours, your account will be deleted automaticly.</p>
    <p><a href='" . BASE_PATH. "/register/activation/$user/$activationKey'>Activate Your Account!</a></p>
    </div>";

    if (mail($to, $subject, $message, $headers))
        return true;
    return false;
}

Where is the mistake?

  • 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-08T04:07:44+00:00Added an answer on June 8, 2026 at 4:07 am

    Mail going to spam rarely has much to do with the code, unless you’re sending spammy content.

    http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code.html

    1. Make sure the computer sending the email has a Reverse PTR record
    2. Configure DomainKeys Identified Mail in your DNS and code
    3. Set up a SenderID record in your DNS

    You should also see if your server is on any blacklists, using something like this blacklist checker. If you’re on one, nothing you’re doing is going to help until you get the listing cleared up.

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

Sidebar

Related Questions

I've searched over this topic but found very few details which were helpful. With
I have searched google, but I didn't find anything. I searched this site and
I have searched and found some info on this topic but the answers are
I've searched plenty on this topic and have gotten a lot of good (but
First of all, I've know there are several questions targeting this topic, but none
I have searched this topic on google a bit and seen some best practices.
First, let me just say that I have searched for information on this topic;
Preface: I am sure this is incredibly simple, but I have searched this site
I searched for this question in various places, but all that they mention is
I've searched on this for a while but none seem to be quite relevant

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.