Formsend Function
Moderator: General Moderators
Formsend Function
Hey guys, got a question. On my site i want to put some Forms. I have the code installed and when I test it out, everything works dandy on the client side. But on the server side it does not send the form as an email. I've opened port 25 for the server but still nada
. Is there a certain Module i need to install or something i need to change in my php.INI?
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
My ISP Is comcast, so it wouldnt surprise me if they did block the SMTP Port.
There's an HTML page that sends the Info to this page. If you want me to post that code, I will.
feyd | Please review how to post code using
Code: Select all
<?
$name = $_POST["name"];
$address = $_POST["address"];
$city = $_POST["city"];
$state = $_POST["state"];
$zip = $_POST["zip"];
$phone = $_POST["phone"];
$email = $_POST["email"];
$comments = $_POST["comments"];
$today = date("M d, Y");
$recipient = "zerogroundz@gmail.com";
$subject = "Web Form Results";
$forminfo =
"Name: $name\n
Address: $address\n
City: $city\n
State: $state\n
Zip: $zip\n
Phone: $phone\n
Email: $email\n
Comments: $comments\n
Form Submitted: $today\n\n";
$formsend = mail("$recipient", "$subject", "$forminfo", "From: $email\r\nReply-to:$email");
?>feyd | Please review how to post code using
Code: Select all
andCode: Select all
tags. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Hmm... it doesn't look like anything is wrong. Comcast's blocking is pretty spotty: http://www.unspam.com/fight_spam/articles/1394.html
Try rerouting your smtp connection via these INI changes:
Try rerouting your smtp connection via these INI changes:
Code: Select all
їmail function]
; For Win32 only.
SMTP = smtp.comcast.net ; for Win32 only
smtp_port = 25
sendmail_from= someemailaddress@exampledomain.com; for Win32 onlyIn my code i have the line:
Is there anyway to have a CC made and sent to another Email Address?
Thnx in advance!
Code: Select all
$recipient = "zerogroundz@gmail.com";Thnx in advance!
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Check out the PHP documentation for mail() : http://us4.php.net/manual/en/function.mail.php and also do some research on email headers.