CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.

YesSoftware Forums -> CodeCharge Studio -> PHP

 Simple Send Email

Print topic Send  topic

Author Message

Posts: 1
Posted: 05/07/2015, 9:14 PM

I am a newbie to CodeCharge and also PHP language and trying hard to learn.
I want to do a simple send email to pop3 email account (gmail).

This is my interface, simple 3 textbox and 1 text area
<p><label for="TextBox1" style="display: none;">From     </label><input id="TextBox1" name="{TextBox1_Name}">  </p>
<p><label for="TextBox2" style="display: none;">To    </label><input id="TextBox2" name="{TextBox2_Name}"></p>
<p><label for="TextBox3" style="display: none;">Subject </label><input id="TextBox3" name="{TextBox3_Name}"></p>
<p><label for="TextArea1" style="display: none;">Content   </label> <textarea style="WIDTH: 135px; HEIGHT: 72px" id="TextArea1" rows="4" cols="13" name="{TextArea1_Name}">{TextArea1}</textarea></p>
<!-- BEGIN Button Button1 --><input id="Button1" value="Button1" alt="Button1" type="submit" name="{Button_Name}"><!-- END Button Button1 --></p>

And this is my mail function code for the button 1
//Send Email @8-D6FFBFF8
global $TextBox2;
global $TextBox1;
global $TextBox3;
global $TextArea1;
ini_set("SMTP", "localhost");
$to = $Container->TextBox2->GetText();
$subject = $Container->TextBox3->GetText();
$message = $Container->TextArea1->GetText();
$from = $Container->TextBox1->GetText();
$charset = "Windows-1252";
$transferEncoding = "";
$additional_headers = "From: $from\nReply-To: $from\nContent-Type: text/html; charset=$charset\nContent-Transfer-Encoding: $transferEncoding";
mail ($to, $subject, $message, $additional_headers);
//End Send Email

When i run the page, fill in all the information and click the button, nothing ever happen.
Can i know what is the problem here? Will appreciate for the help
View profile  Send private message

Posts: 638
Posted: 05/08/2015, 3:57 AM

Here's one we prepared earlier...

Might give you some ideas.

Am guessing you have a mail server on your local computer..
Central Coast, NSW, Australia.

View profile  Send private message

Add new topic Subscribe to topic   

These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

Internet Database

Visually create Web enabled database applications in minutes.

Home   |    Search   |    Members   |    Register   |    Login

Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by  and YesSoftware, Inc.