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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:32:35+00:00 2026-06-09T18:32:35+00:00

am trying to send emails using codeigniter email library to send emails to users

  • 0

am trying to send emails using codeigniter email library to send emails to users using the following settings

  $this->load->library('email');
        $this->email->from('email@domain.com','Admin');
        $this->email->to($recieverEmail);
        $this->email->subject('Morgan MarketBook');
        $this->email->message($message);


   <?php if (!defined('BASEPATH')) exit('No direct script access allowed');

   $config['protocol']   = 'smtp';
   $config['smtp_host']  = 'mail.server';
   $config['smtp_port']  = 26 ;
   $config['smtp_user']  = 'user' ;
   $config['smtp_pass']  = 'password' ;
   $config['newline']    = "\r\n";

   ?>

my problem that the received emails are in the junk mail and not in the inbox…what is causing this problem ?

  • 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-09T18:32:36+00:00Added an answer on June 9, 2026 at 6:32 pm

    Mail getting into junk instead of inbox isn’t code related or codeigniter related for that matter. You have to follow some guidelines in order for the email not to be considered spam:
    Some of these guidelines are:

    • when sending html email, include also the text version of the mail
    • when sending html email, keep the html and images to a minimum (don’t include javascript)
    • setup the mail server with spf and domain keys
    • the “from” field should contain a valid email address (with the same domain as the mail server)
    • if you send mass emails, try to limit the rate of sending

    there are lots of guidelines for sending valid emails with php, just google “best practice for sending emails php”

    Also, don’t include your login credentials to your mail server.
    Cheers

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

Sidebar

Related Questions

I'm trying to send an e-mail with Codeigniter like this: $this->load->library('email'); $this->email->from(myemail@email.com); $this->email->reply_to(myemail@email.com); $this->email->to(myemail@email.com);
I am trying to send an email from a C++ program using imap library.
I am trying to send emails from smtps (secure smtp) using Indy and the
I am trying to send email using gmail from my mvc application. I am
I am trying to send email using Exchange 2007 from a console app using
I am trying to send email using c# following is my code. try {
I'm trying to send an email using codeigniter, and would like the message to
I'm sending out an email using CodeIgniter 's built in library. All I'm trying
Well I'm trying to send a HTML email using gmail smtp from CI, and
Im using swiftmailer to send my emails from my site. I'm trying to get

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.