Welcome Guest, Not a member yet? Register   Sign In
SMTP Error - Undefined index: Subject
#1

[eluser]mwolf[/eluser]
I am trying to setup email to send via a SMTP service I registered for and I keep getting the Undefined index: Subject error message.

Code:
$this->load->library('email', $config);
        $this->email->from('[email protected]', 'Support');
        $this->email->to('[email protected]');
        $this->email->message('This is my message');
        $this->email->subject('This is my subject');
        $this->email->send();

When outputting print_debuger, I see the following:

Code:
User-Agent: CodeIgniter
Date: Wed, 23 Dec 2009 12:40:52 -0600
From: "Support"
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
=?utf-8?Q?This_is_my_subject?=
This is my message


I don't see any issues, but it continues to throw the same error.

Code:
A PHP Error was encountered

Severity: Notice
Message: Undefined index: Subject
Filename: libraries/Email.php
Line Number: 940

Any idea what I am doing wrong? Any help is appreciated!
#2

[eluser]Colin Williams[/eluser]
Just for grins, try moving the subject() call above message(). It shouldn't matter, but it's worth a shot.
#3

[eluser]mwolf[/eluser]
Nope, stuck on the same error....
#4

[eluser]Colin Williams[/eluser]
K. It was a shot in the dark. I would get your hands dirty in the email class and start debugging. My first step would be to inspect the array that it is trying to access 'Subject' from. See what's up
#5

[eluser]mwolf[/eluser]
It sounds like this is a bug in code igniter then? I'll see if I can track it down this evening.
#6

[eluser]Unknown[/eluser]
Hi

i am getting same error

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

                $this->email->from('[email protected]', 'Sandeep');
                $this->email->to($this->input->post('payer_email'));
                //$this->email->cc('[email protected]');
                //$this->email->bcc('[email protected]');
                $this->email->subject('Email Test');
                $this->email->message('Testing the email class.');
                $this->email->send();

any solution
#7

[eluser]ch5i[/eluser]
I think there is a bug in Email.php => see this thread




Theme © iAndrew 2016 - Forum software by © MyBB