Google Answers Logo
View Question
 
Q: PHPmailer and form sending via smtp... ( No Answer,   1 Comment )
Question  
Subject: PHPmailer and form sending via smtp...
Category: Computers > Programming
Asked by: 4thepeople-ga
List Price: $9.50
Posted: 06 Feb 2004 11:21 PST
Expires: 09 Feb 2004 14:20 PST
Question ID: 304176
First, I am using this simple form http://3guns.com/clan.htm
Currently this form is being submitted via the submitter's email client. 
I would rather send this via php/email, formatted to me.

What I need
----------------------------------------------------------------------------
The phpmailer file(s) modified with my fields from the above form.
The name of the files and where to place them relative to my web directory.
ie, sendform.php, clan.htm, etc etc
----------------------------------------------------------------------------

Details
----------------------------------------------------------------------------
Web and SMTP are the same machine, so I don't need authorization to relay..
From name should be 'mailer' sent to recruiter@3guns.com via smtp (hence phpmailer)
Subject line should be "Membership Inquiry"
Answer  
There is no answer at this time.

Comments  
Subject: Re: PHPmailer and form sending via smtp...
From: defcon-ga on 06 Feb 2004 16:41 PST
 
Hi.
Add this to the beginning of the file.
<? if ( $_SERVER[ 'REQUEST_METHOD '] == 'POST' ) {
   $s='';
   foreach( $_POST as $k=>$v ) $s.="$k = $v\r\n"; 
   mail("to@your.address","New form",$s);
}
?>

and don't forget to change 
<form action="mailto:recruiter@3guns.com?subject=Clan Inquiry Form"
method="post" enctype="text/plain">
to 
<form action="<? print $_SERVER[ 'PHP_SELF' ]; ?>" method="post"
enctype="text/plain">

Good luck

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy