rawkem Posted April 3, 2008 Share Posted April 3, 2008 Hi, I'm having some issues getting my php and my html form to work together, here is the code I'm using. <? require("c:\php\includes\class.phpmailer.php") $mail = new PHPMailer(); $mail->IsSMTP(); $mail->Host = "mail.YourDomain.com"; $mail->SMTPAuth = true; $mail->Username = "[email protected]"; $mail->Password = "EmailPassword"; $mail->From = "[email protected]"; $mail->FromName = "Your Name"; $mail->AddReplyTo("[email protected]"); $mail->AddAddress("[email protected]"); $mail->IsHTML(true); $mail->Subject = "Test message sent using the PHPMailer component"; $mail->Body = "This is a test message."; $mail->Send() ?> Here is what I have for the form.. <form name="contact" method="post" action="phpmailer.php"> Name <br /> <input name="name" type="text" size="31" id="name" /> <br /> Email <br /> <input name="email" type="text" size="31" id="email" /> <br /> Comment <br /> <textarea name="comment" cols="23" rows="4" id="comment" > </textarea> <br /> <br /> <label> <input type="submit" name="Submit" value="Submit" /> </label> <br /> </form> Thanks for any help.! Link to comment https://forums.phpfreaks.com/topic/99435-mail-form-trouble/ Share on other sites More sharing options...
doni49 Posted April 4, 2008 Share Posted April 4, 2008 Uh--what kind of trouble are you having? What are the symptoms? You can't go to the doctor and just ask "what's wrong with me?" You have to tell him what makes you think there's something wrong so he'll know what to look for. I did take a quick look at what you've posted. All that's happening is that when the user "submits" the form, the script runs. But you don't have the script doing anything with the form data or checking the data to see if there are problems. So my first guess is that you're wondering why the form data doesn't end up in your email. Link to comment https://forums.phpfreaks.com/topic/99435-mail-form-trouble/#findComment-508960 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.