Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic emailing help

Status
Not open for further replies.

maddyyikes

IS-IT--Management
Jul 19, 2004
32
US
Hi,
I have the following piece of code used for sending it to a predefined mailing list such as cthompson@yahoo.com However there is a field labeled "email" in a given form, from which I need to pick up the values and use them as a data feed for this PHP code. Simply put, I need to distribute the email to a dynamically generated set of email addresses from the given form. This is highly urgent and any help is highly appreciated. Thanks for your help in advance. The PHP code that I used is given below:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"<html>
<!-- DW6 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>IT Customer Service Desk Pilot Survey Thanks</title>
<link rel="stylesheet" href="emx_nav_right.css" type="text/css">

</head>
<body>
<div id="pagecell1">
<!--pagecell1-->
<img alt="" src="tl_curve_white.gif" height="6" width="6" id="tl"> <img alt="" src="tr_curve_white.gif" height="6" width="6" id="tr">

<div id="content">
<div class="story">
<h3>IT Customer Service Desk Online Pilot Survey</h3>
<script language="php">
// Report all errors except E_NOTICE
// This is the default value set in php.ini
error_reporting(E_ALL ^ E_NOTICE);
$email = $HTTP_POST_VARS;
$mailto = "cthompson@yahoo.com";
$mailsubj = "IT Customer Service Desk Online - Pilot User Survey (Form Submission)";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Responses submitted from the IT Customer Service Desk Pilot User Survey:\n\n";
while (list ($key, $val) = each ($HTTP_POST_VARS)) {$mailbody .="$key:$val\n\n";}
if (!eregi("\n", $HTTP_POST_VARS[email])) {mail ($mailto, $mailsubj, $mailbody, $mailhead) ;}
</script>
<br>
<p><SPAN class=945193314-09012006>Thank you for taking the time to complete the survey.&nbsp; Your survey has been successfully submitted.&nbsp; </SPAN>
<p>&nbsp;</P>
</div>
</div>
</div>
<!--end pagecell1-->

</body>
</html>
 
what is the problem you're having?

"Together we can make 'computer illiterate' a dirty word."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top