Delphi For PHP Forums       


Go Back   Delphi-PHP Forums > Delphi For PHP > Tutorials
Forum Jump Register FAQ Members List Downloads Search Today's Posts Mark Forums Read

Tutorials This forum focuses on showing people how to do things in Delphi for PHP including step by step how-to guldes and screencasts etc.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 19th February 2008, 21:45
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,268
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default Contact form demo.

Not sure if this is the correct forum but here goes.

We all seem to have a need for a contact us page on our websites. Some to avoid spamrobots or for those who are using your site from behind a firewall that doesn't allow emails.

This little demo pops up a qx.window and fills it with a qx.browserFrame which loads an external page that acts as the email sender.
Quote:
This particular one uses phpmailer class which can be found here if you don't already have it. It just needs to be located in your php include path or hard code a location. I have a root access server so I loaded it once for all websites on my server.
You can see how it works with out sending the emails by just running it though.

Main program is the contactdemo.php and the fill is democontact.php If you have a favicon.ico on your site it will load it into the inner window.

I think I coded everything self explanatory but if you have questions just ask.
Attached Files
File Type: zip democontact.zip (4.2 KB, 204 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10th March 2008, 12:10
delphi-php's Avatar
Forum Admin
 
Join Date: Mar 2007
Location: London, UK
Posts: 599
delphi-php has a reputation beyond reputedelphi-php has a reputation beyond reputedelphi-php has a reputation beyond reputedelphi-php has a reputation beyond reputedelphi-php has a reputation beyond reputedelphi-php has a reputation beyond reputedelphi-php has a reputation beyond reputedelphi-php has a reputation beyond reputedelphi-php has a reputation beyond reputedelphi-php has a reputation beyond reputedelphi-php has a reputation beyond repute
Default

Thanks for sharing 405hp!

Cheers ....
Gerald.
__________________
Don't forget to add to a users reputation if they have helped you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 29th April 2008, 21:03
just Joined!
 
Join Date: Apr 2008
Posts: 1
erhanz is on a distinguished road
Default

when i run it ,blank page comes out gary
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 29th April 2008, 22:13
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,268
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default

Are you running it in from your IDE?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 4th June 2008, 17:45
D4PHP User
 
Join Date: Jun 2007
Location: Naples, FL
Posts: 40
lifeform is on a distinguished road
Default

Thanks for the routine 405hp I'm not sure if I missed something, but I needed to set the ButtonType property of the "Contact Us" BitBtn to btNormal to make the popup window stay open. Before I did this, the window opened, but closed immediately when the contactdemo form submitted.
__________________
If it was too easy it would be no fun
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 4th June 2008, 18:26
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,268
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default

Qadram changed the VCL since then and they changed the default from normal to submit

Last edited by 405hp; 21st October 2008 at 23:14. Reason: can't spell :)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 22nd May 2009, 10:54
D4PHP User
 
Join Date: Apr 2009
Posts: 51
kaku137 is on a distinguished road
Default

Quote:
Originally Posted by lifeform View Post
Thanks for the routine 405hp I'm not sure if I missed something, but I needed to set the ButtonType property of the "Contact Us" BitBtn to btNormal to make the popup window stay open. Before I did this, the window opened, but closed immediately when the contactdemo form submitted.
BitBtn is btNormal that it's ok.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 25th May 2009, 03:06
D4PHP User
 
Join Date: Apr 2009
Posts: 51
kaku137 is on a distinguished road
Default

Hi, 405hp

http://phpmailer.codeworxtech.com

Which file should I download?

PHPMailer v2.3 for PHP5/6 ? or PHPMailer v5.0.0 ?

Can U tell me?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 25th May 2009, 03:18
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,268
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default

Looks like PHPMailer version 5.0.0 is a complete rewrite which may be the thing to go to.

My original was probably v2.0.0 as it was a while ago.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 25th May 2009, 04:22
D4PHP User
 
Join Date: Apr 2009
Posts: 51
kaku137 is on a distinguished road
Default

Quote:
Originally Posted by 405hp View Post
Looks like PHPMailer version 5.0.0 is a complete rewrite which may be the thing to go to.

My original was probably v2.0.0 as it was a while ago.
thanks !

But I did not find "class.phpmailer.php" in version 5.0.0,
then I try to use PHPMailer v2.3 for PHP5/6 , this code is ok?:
PHP Code:
 function Button1Click($sender$params)
 {
      require_once(
'phpMailer_v2.3/class.phpmailer.php');  
         
$mailer = new PHPMailer();
         
$mailer->From =  $this->eMail->Text;
         
$mailer->FromName " Web Order";
         
$mailer->Hostname  =  "ns.abc.com";
         
$mailer->AddAddress("kaku137@abc.com",'Customer Service'); // name is optional
         
$mailer->WordWrap 50;                                    // set word wrap to 50 characters
         
$mailer->IsHTML(true);                                     // set email format to HTML
         
$mailer->Subject "Custserv Contact from ".$this->eName->Text;
         
$mailer->Body    $this->eMessage->Text;
         
$mailer->Send();
         
$this->Panel1->Visible=true;
         if (
$this->CheckBox1->Checked==true// Send a copy to my inbox.
           
{
             
$mailer->ClearAddresses();
             
$mailer->AddAddress($this->eMail->Text$this->eName->Text);
             
$mailer->Send();
           }
 } 
Then I tested it,
the program was carried out,
but I was not able to exchange emails.

error message: Could not instantiate mail function

Do you know why?

Last edited by kaku137; 25th May 2009 at 07:49.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +1. The time now is 10:37.




Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 ©2009, Crawlability, Inc.
Copyright © 2004 - 2009, G&J Solutions Ltd. All Rights Reserved. terms of use