Need a new web host or having a problem with a script? Tips and advice on the best way to design, build and maintain your most valuable asset - your website!

Are you using this function for autoresponders etc?

davmontrose
Posts: 93
Joined: 15 Oct 06
Trust:

Are you using this function for autoresponders etc?

Hey are you guys using this function when your having your opt in form, or contact us form, to link back with the information to your autoresponders, or email marketing system, which ever way you want to term it.

<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "order@example.com";
$mailsubj = "Enter Your Subject Here";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form :\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
if ($key!="submit")
{
$mailbody .= "$key : $val\n";
}
}
mail($mailto, $mailsubj, $mailbody, $mailhead);

Something similar to that is what I'm told I should put inside my body tag.

Is this somewhat correct? Cheers Davin
?>
  • 0
PremiumMember
chatyak86
Posts: 1369
Joined: 17 Jun 06
Trust:
You have no need for this if you are using aweber... they capture all the mail automatically........ unless you are just using a "contact us" form?

Adrian,
  • 0
alvin
Posts: 92
Joined: 24 Oct 06
Trust:
Davin,

The form you're showing is a script that'll capture some form data and send it to an email you provide.

The script itself is open to vandalism as it can be easily hijacked to send out spam.

If you're building a list, then like Adrian says, use the generated Aweber (or whatever service you're using) form.

@
  • 0
davmontrose
Posts: 93
Joined: 15 Oct 06
Trust:
well will do then, I guess I'll just open up an Aweber account and save myself the headache. Thanx guys Davin
  • 0
cron