I've got a e-newsletter form during my wordpress site which said to be used with the shortcode :

<form action="newsletter.php" method="post">

And also the shortcode need to look :


During my theme option i've a port area to go in the e-mail address. That value must be saved in e-newsletter.php within the variable $to

How do i 'connect' the e-newsletter.php using the wordpress get_option for your input i've?

e-newsletter.php :

$email = $_POST['news'];

// --- this should be the option from the wordpress panel -------
$to = "mail@mail.com";
// ---------------------------------

$subject = "newsletter request";

$date = date("d-m-Y");

$email_message = " Newsletter request : \r\n";
$email_message .= " ================================================== \r\n ";
$email_message .= "This user wants to be notified about your website launch : ".$email."\r\n";
$email_message .= " ================================================== \r\n";
$email_message .= " Request was sent " .$date. " \r\n";

$headers = 'From: '.$email."\r\n";

if($email != null && $email != ""){




I attempted with REQUIRE_ONCE but, that is not working...

Well you need to produce a wordpress plugin, I'm giving instruction to produce a simple wordpress plugin. I only say again SIMPLE. And it is not the only method to produce a wordpress plugin, but it will likely be easy choice for you.

Produce a file in plugins folder and do code such as this

 * @package Simple Plugin
 * @version 0.0.1
Plugin Name: Usman
Author: Muhammad Usman
Version: 0.0.1

function showpage($content)
          //Write your code
          //Save fields or so

          $content="Form submitted";


    return $content;


Activate this wordpress plugin from admin panel and make up a page, write [myplugin] in content. And provide your form action for this page's permalink.

More particulars are available at http://codex.wordpress.org/Writing_a_Plugin