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

  • Home
  • SEARCH
  • 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 6720305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:11:48+00:00 2026-05-26T09:11:48+00:00

I am using the Tank Auth library for CodeIgniter. When a user is registered,

  • 0

I am using the Tank Auth library for CodeIgniter. When a user is registered, the system sends them an email activation. This is working properly on my local setup, but on the live server the email is not being sent (or at least it never arrives). Emails that are automatically sent from other places – controllers that I write – using CodeIgniter’s email class are being delivered as expected.

For example, this code in one of my controllers is working properly locally and on the live server:

$message = $this->load->view( 'email/email', $this->data, true );

$this->email->clear ();
$this->email->to        ( $send_to );
$this->email->reply_to  ( $reply_to );
$this->email->from      ( $from );
$this->email->subject   ( $subject );
$this->email->message   ( $message );
$this->email->send      ();

This code in Tank Auth sends an email on my local setup, but fails to do so on the live server:

$this->load->library    ( 'email' );
$this->email->from      ( $this->config->item( 'from_email' ), $this->config->item( 'site_title' ) );
$this->email->reply_to  ( $this->config->item( 'reply_email' ), $this->config->item( 'site_title' ) );
$this->email->to        ( $email );
$this->email->subject   ( sprintf( $this->lang->line( 'auth_subject_' . $type ), $this->config->item( 'site_title' ) ) );
$this->email->message   ( $this->load->view( 'email/' . $type . '-html', $data, TRUE ) );
$this->email->send      ();

However, it does appear that the system thinks it is sending the email:

Your message has been successfully sent using the following protocol: mail

User-Agent: CodeIgniter
Date: Thu, 20 Oct 2011 12:30:28 -0400
From: "[redacted]" 
Return-Path: 
Reply-To: "[redacted]" 
X-Sender: [redacted]
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <4ea04ca449b0d@[redacted]>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="B_ALT_4ea04ca449ef3"

[message content]

Replacing the CodeIgniter mail stuff with the following works everywhere:

$hash           = md5(time());
$mime_boundary = "==Multipart_Boundary_x".$hash."x";
$headers        = "From: $email->from \n" .
                 "Reply-To: $email->reply_to \n" .
                 "MIME-Version: 1.0 \n" .
                 "Content-Type: multipart/mixed; \n" .
                 " boundary=\"{$mime_boundary}\"";
$body           = "This is a multi-part message in MIME format.\n\n" .
                 "--{$mime_boundary}\n" .
                 "Content-Type:text/html; charset=\"utf-8\"\n" .
                 "Content-Transfer-Encoding: 8bit\n\n".$email->message."\n\n";

mail( $email->to, $email->subject, $body, $headers );

So, obviously I have a viable work-around, but I would really like to know what is causing such a specific failure both for my future self and for others who might be coming up against the same issue.

I did find this question which seems to be about the same or a related problem but there is no answer.

UPDATE: My host poked around and found the following error related to this problem:

Oct 20 17:16:25 host qmail-scanner[26428]: Policy:Bad_MIME:RC:1(127.0.0.1)
  • 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-26T09:11:48+00:00Added an answer on May 26, 2026 at 9:11 am

    Did you verify that each value being passed to email by Tank Auth is correct?

    Also, does does send() return false?

    Also, do you have any other emails being sent where you might need the: clear();

    Just a thought…

    OK then,

    What protocol are you using? I’ve found that SMTP often works better for me than mail.

    SMTP (or a software update) could also fix your ‘Policy:Bad_MIME’ issue. See:
    http://www.atomicorp.com/forum/viewtopic.php?f=2&t=4337

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

Sidebar

Related Questions

I am using Codeigniter PHP Framework with Tank Auth authentication library. In my config
I am using Tank Auth for Codeigniter to facilitate user registration and login. Problem:
I don't do much PHP but I saw this library called, Tank Auth for
I'm using CI's Auth Tank library to query records for certain users. The variable
I found another bug in my cms where Im using the Tank Auth library
I have a simple tank wars style game using the allegro open source library.
This is my first time using authentication library. I followed this post to install
I am using codeigniter and its routes system successfully with some lovely regexp, however
I am using Codeigniter with the TankAuth library installed and trying to upload to
I'm using a reCaptcha class (the one that's included in the Tank Auth authentication

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.