Welcome Guest, Not a member yet? Register   Sign In
Email mail() problem
#1

[eluser]Kemik[/eluser]
Quote:Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.

From: "CI Base"
Return-Path:
Reply-To: "[email protected]"
X-Sender: [email protected]
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Activate your account - CI Base
Hello User,

rest of message

My host (resellerzoom) have no idea why CI says mail() isn't working. So I thought I'd best try here.

Code:
$this->load->library('email');

        $this->email->from('[email protected]', 'CI Base');
        $this->email->to($email);
        
        $this->email->subject('Activate your account - CI Base');
        $this->email->message($message);
        
        $this->email->send();
        
        echo $this->email->print_debugger();

sendmail gives an internal server error.
#2

[eluser]Derek Allard[/eluser]
How do you send mail from PHP outside of CodeIgniter?
#3

[eluser]woodydude[/eluser]
I'm having a similar problem to be honest...

I can send an email using the following code:
Code:
mail("[email protected]", "Email Subject", "Message content", "From: [email protected]" );

however I'd prefer to use the CI emailing, but using the following code it's not working:
Code:
$this->load->library('email');

$this->email->from('[email protected]');
$this->email->to('[email protected]');
$this->email->subject('Contact Form');
        
$msg = 'This is my message content';
$this->email->message($msg);
        
$this->email->send();
The result of:
Code:
print $this->email->print_debugger();
I get:
Quote:Unable to open a socket to Sendmail. Please check settings.
Unable to send email using PHP Sendmail. Your server might not be configured to send mail using this method.

User-Agent: CodeIgniter
Date: Fri, 18 Apr 2008 14:33:51 +0100
From:
Return-Path:
To: [email protected]
Subject: Contact Form
Reply-To: "[email protected]"
X-Sender: [email protected]
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0


Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Any ideas?
Cheers Woody
#4

[eluser]tomodian[/eluser]
I had same problem, and in my case, mailserver was unable to send mail when From: and Return-Path is blank.
Try setting both From and Return-Path to check in your environment.
#5

[eluser]druid100[/eluser]
i have the same problem, neither in From: nor in Return-Path: is the email address specified which i set with emai->from(...).

any ideas why that could happen?
#6

[eluser]druid100[/eluser]
hmm ... actually if you log the debug output to a file you probably will see that data is not blank, i made the same mistake to just echo it to the browser, so everything between < and > is not shown properly.
#7

[eluser]Peri[/eluser]
The trouble is in restrict functions php. Probably your hosted disabled functios like popen for example.




Theme © iAndrew 2016 - Forum software by © MyBB