CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Simple Send Email

Print topic Send  topic

Author Message
JsonTeh

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
<body>
<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>
<p>
<!-- BEGIN Button Button1 --><input id="Button1" value="Button1" alt="Button1" type="submit" name="{Button_Name}"><!-- END Button Button1 --></p>
</body>


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);
ini_restore("SMTP");
//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
MichaelMcDonald

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..

http://forums.yessoftware.com/posts.php?post_id=123299
_________________
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 http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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