Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
KnowledgeWoods Consulting
5,607 PointsCapture email id of the Form Sender dynamically
I want to send a mail to about 1000 clients. In that mail a form is sent. It asks user about their feedback and then user submits the form. What i need is that when user submits the form, his/her email id is sent along with that. User should not enter email id again. CAN ANYONE HELP?????
2 Answers
Hugo Leon
7,763 PointsHello Bhaskar!
Do you have some code you want to share? Would be great to help us understand a little bit better and we could help you solve your problem.
Cheers.
KnowledgeWoods Consulting
5,607 Pointsrequire_once('class.phpmailer.php'); //include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
$mail1 = new PHPMailer();
$body1 = '<input type="button" value="I am Interested" onclick="location.href=\'http://elearn.knowledgewoods.com\';">'; //need to send a form here
$mail1->IsSMTP(); // telling the class to use SMTP
$mail1->Host = ""; // SMTP server $mail1->SMTPSecure = "tls"; $mail1->SMTPAuth = true; // enable SMTP authentication $mail1->Host = ""; // sets the SMTP server $mail1->Port = ; // set the SMTP port for the GMAIL server $mail1->Username = ""; // SMTP account username $mail1->Password = ""; // SMTP account password
Why is $mail1->Host written two times in php mailer?
Secondly, if the form is sent on someone's email and he fills his contact info and send it. Will we be able to identify the mail address from which particular form is received?