I tried sending an email with my gmail account and it worked:
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => '[email protected]',
'smtp_pass' => 'xxxxxx',
'mailtype' => 'html',
'charset' => 'iso-8859-1'
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from($this->input->post('email'));
$this->email->to('[email protected]');
$this->email->subject('Email From user');
$this->email->message('You have received an email from a user.');
$result = $this->email->send();
However, I need to get it running on another server. Now the actual email address that the email is sent to is the actual name of the site: [email protected]. But when I try sending it to this email, it doesn't work. The site is hosted on rackspace cloud, but I am not sure if the email is serviced through rackspace cloud. And the guy to ask wouldn't know the answer. Is there a way to find out where the email is being serviced because I need an smtp username and password in order to send the email.
thanks for response
Find out if there are any MX records in use/play "nslookup -type=mx (thesite.com - identifying the real site would have helped)" (without the quotes and replace the () text with the actual domain).
traceroute or tracert (depending on the rest of the world or Windows) to the MX identified server(s) or the domain, if MX records are not in use
The last entry/entries of the trace will typically provide good hints as to where/with whom the servers are located.