Hello all,
I'd like to email the results of a contact form submission as an Excel attachment. I'm currently using the following (abbreviated):
<?php
@extract($_POST);
$name = stripslashes($name);
$email = stripslashes($email);
$subject = 'Contact Form';
$text = stripslashes($message);
/* Specify your SMTP Server, Port and Valid From Address */
ini_set("SMTP","mail.abc.com");
ini_set("smtp_port","25");
ini_set("sendmail_from","abc@abc.com");
mail('abc@gmail.com',$subject,"Name: $name\nEmail: $email\nComments: \n$message","From: $name <$email>");
echo("Thank you for your interest");
?>
Ideally, on submit, I'd like the 3 form variables (name, email, message) to each have their own column in the Excel file, and be emailed as an attachment.
I've looked around, but can't find anything. Any ideas?
Thanks
Rick
I'd like to email the results of a contact form submission as an Excel attachment. I'm currently using the following (abbreviated):
<?php
@extract($_POST);
$name = stripslashes($name);
$email = stripslashes($email);
$subject = 'Contact Form';
$text = stripslashes($message);
/* Specify your SMTP Server, Port and Valid From Address */
ini_set("SMTP","mail.abc.com");
ini_set("smtp_port","25");
ini_set("sendmail_from","abc@abc.com");
mail('abc@gmail.com',$subject,"Name: $name\nEmail: $email\nComments: \n$message","From: $name <$email>");
echo("Thank you for your interest");
?>
Ideally, on submit, I'd like the 3 form variables (name, email, message) to each have their own column in the Excel file, and be emailed as an attachment.
I've looked around, but can't find anything. Any ideas?
Thanks
Rick