File: /home/awaldron/public_html/archive/ras/application/controllers/mail.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class SendMail extends CI_Controller {
public function index()
{
$to = $_POST['to'].'@rasnoznik.net';
$subject = 'RASnoznik.net : Message from '.$_POST['name'];
$message = "\nName : ".$_POST['name'];
$message .= "\nEmail : ".$_POST['email'];
$message .= "\nPhone : ".$_POST['phone'];
$message .= "\nDate : ".date("F d, Y h:i:s a", strtotime('+3 hours'));
$message .= "\n\nMessage:\n".$_POST['message'];
$headers = 'From:'. $_POST['email']. "\r\n" .
'Reply-To:'. $_POST['email']. "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
$this->redirect('Location: http://www.rasnoznik.net/contact.php?ty=1');
}
}
/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */
?>