/    Sign up×
Community /Pin to ProfileBookmark

php html contact email form not working????

i tried this once before so there my be 2 threads… sorry for that

hello all i have a bit of a prob, i have a contact form that works great for sending an email, but it dosnt work for the 1 email that it needs to.

the link is [url]http://www.mypacifichome.com/contact.php[/url]
and on submit is goes to this php code…


**********************************

<?php
if(isset($_POST[‘submit’])) {
$to = “[email protected]“;
$subject = $_
POST[‘subject’];
$name_field = $_POST[‘firstname’];
$lastname_field = $_
POST[‘lastname’];
$phonenumber_field = $_POST[‘phonenumber’];
$email_field = $_
POST[’email’];
$message = $_POST[‘message’];

$body = “From: $name_fieldn last: $lastname_fieldn E-Mail: $email_fieldn Phone: $phonenumber_fieldn Message:n $message”;

echo “Data has been submitted to $to!”;
mail($to, $subject, $body);

} else {

echo “Your email was not able to be received !”;

}
?>


************************************

the guy i made the form for isint getting any of the emails through the form, but i replaced his email with a couple of mine, and they worked.

i think it might be related to the fact that his hosting company is “swsoft PLESK” i have never seen this before, and it is a bit diffrent then anything i have ever used before,

his email is like any other websites, ending in his domain ****@mypacifichome.com can anyone think of why this is?

another way to send an email through a form? or something

anythings would help, thanks a lot for any help

to post a comment
Full-stack Developer

1 Comments(s)

Copy linkTweet thisAlerts:
@Stephen_PhilbinFeb 24.2008 — Do you have any useful debugging info, such as if the mail() function returns true or if he gets and administrative emails from his system about message delivery failures?

I notice you have no additional headers to indicate a address of origin or a replay address. His mail software make be rejecting the mails on that basis alone. You could probably negate the need to add any of that, though, simply by removing the domain part of the email address (assuming PHP is installed on the same machine as the MTA).

Try removing the "@mypacifichome.com" part of the $to variable and see if he starts receiving them.
×

Success!

Help @zbmarley spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.23,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...