Welcome Guest, Not a member yet? Register   Sign In
Inconsistent Mail Error on Server: "Unable to send email using PHP mail()"
#1

[eluser]djreed[/eluser]
So - I am having a really weird issue! I am trying to send an email with Codeigniter's Email Library. It works fine locally, but for some reason I keep getting the following error when I test it live on my Lunarpages server:
Quote:Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.

Here's where it gets really weird - the code I am using is almost identical to what I am using in another Controller on another part of this very server - and the mail works fine there! The <b>only difference</b> is that this new Controller is on a <b>domain parked to a subdirectory</b> of this same server, whereas the original controller is on the <b>main directory and main domain</b> of the server. The only thing I can imagine is that this is causing the problem. Hopefully somebody has some clues here that understands SMTP better than I. Here is the code:

Code:
$config['mailtype'] = 'html';
$this->email->initialize($config);
$this->email->from('[email protected]', 'Testing From');
//To the business contact from listing array
$this->email->to($data['listing'][0]->contact_email);
$this->email->subject('New rental reservation request');
$this->email->message('<center><img src="'.config_item('img_base').'new_rental_lead.png"/></center><strong>Customer name: </strong>'.$_POST['first_name'].' '.$_POST['last_name'].br().'<strong>Delivery address:</strong> '.br().$_POST['delivery_address'].br().$_POST['delivery_city'].', '.$_POST['state_prefix'].' '.$_POST['delivery_zip'].br().'<strong>Phone number:</strong> '.$_POST['phone_number'].br().'<strong>Email:</strong> '.$_POST['email'].br().'<strong>Estimated Event Date:</strong>'.$_POST['date'].br().'<strong>Estimated Number of Guests:</strong> '.$_POST['guests']);    

$this->email->send();
echo $this->email->print_debugger();

Any help would be greatly appreciated! If you need clarification on this, don't hesitate to ask.


Messages In This Thread
Inconsistent Mail Error on Server: "Unable to send email using PHP mail()" - by El Forum - 04-08-2010, 01:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB