Jump to content

Recommended Posts

Hi guys,

 

I've been struggling with this for a while and had no luck. I've created a very simple php form for my client and it's sending the results to a hotmail account no worries. My client's e-mail is with activ8 and they are not recieveing a single e-mail from the PHP form.

 

I understand I can 'whitelist' an e-mail address in my client's e-mail account. My question is:

 

a) if this is the solution, which address do I whitelist? As it's coming from a PHP form and not an e-mail address as such, I'm not sure how to tackle this.

 

b) if this is not the solution, what else should I try?

 

Thanks so much for your help guys, I really appriciate it :)

PXLCKN

At the mean time you can check the Junk/Spam folder. If this does not work.

Your files will be hosted with a hosting company, by sending emails through a PHP form it use the hosting company domains/ips. You can check more with your service provider. So after that you can set in the PHP code 'From', so it will send the email to the correct addresses.

Just a thought.

  • 2 weeks later...

Thanks guys.

 

Well, the code I am using is below. I don't understand though, as I am recieving the email in my hotmail account just fine. It just doens't seem to be getting through to my client's email.

 

Any further advice very gratefully accepted - I'm a bit lost!

 

Thanks guys..

 

<?php

if(isset($_POST['submit'])) {

 

$to = "CLIENT_EMAIL_HERE";

$subject = "Contact / Booking Form from booking Website";

$name = $_REQUEST['name'];

$email_field = $_POST['email'];

 

$phone = $_POST['phone'];

$comments = $_POST['comments'];

 

$headers = "From: $name via booking website";

 

$body = "From: $name \n\n E-Mail: $email_field\n\n Phone Number: $phone\n\n Message:\n $comments\n";

 

  header( "Location: thankyou_contact.html" );

mail($to, $subject, $body, $headers);

 

} else {

 

echo "Unexpected error. Please contact your website host";

 

}

?>

i wonder how u can receive the email in msn, or hotmain when header() before mail()

$headers = "From: $name via booking website";

this should be some email header, not those u specify

 

like from email address (u can put watever address u want, like From: [email protected])

and email's mime type, text/text, text/html

Hi greatstar00,

 

I think I know what you mean. Could you please give me an example of the code I should use for the header then? Or do I just not specify it?

 

I am recieveing the emails in hotmail and my other webmail accoutn so I'm not sure if this is the problem??

 

Thanks...

I just took out the following code:

 

$headers = "From: $name via booking website";

 

And it only bloody worked! I don't really understand why, but it's now coming through into my client's e-mail address.

 

greatstar00, you truly are a great star. You've really saved me here, thanks mate  :P

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.