Jump to content

Recommended Posts

Hey,

 

trying to get a simple contact form working using PHP.

 

I've been using this code just to simplify things;

 

<?php

// Your email address
$email = "noone@nowhere.com";

// The subject
$subject = "Enter your subject here 5";

// The message
$message = "Enter your message here 5";

mail("chriso20@msn.com", $subject, $message, "From: $email");

echo "The email has been sent.";

?>

 

chriso20@msn.com is my email address. I also have chriso20@gmail.com for testing.

 

It works for the msn account when i send it from something random - and i think not registered (eg. afkdl@fdsajfd.com works - where as trying a registered - eg. a friends email address won't work)

 

The gmail account works for everything except for itself (sending mail to and from chriso20@gmail.com)

 

 

 

Is this something to do with msn/hotmail accounts?

 

 

Thanks in advance!

 

Chris

i've just set up a yahoo account (which recieves all emails - even from itself - sent from the php script) and a new hotmail account - which doesn't even recieve emails from the yahoo account! (recieved from the other msn email account, and sent emails no problem though)

 

could this be because they're new email addresses?

 

I'l keep this up to date - anyone got any ideas what's going on with the msn/hotmail accounts?

Best thing to do is to send from your server. Log the script into pop3 before you send. This way it actually send like an email and not just spam which msn/gmail/yahoo will just whack in the trash folder.

 

 

To send from hotmail to hotmail and gmail to gmail and yahoo to yahoo and vice versa..whatever, you need exta auth before sending from the relevent servers. Best thing is to send from your own domain name.

ok new problem!

 

I can get the form to send emails to anyone - saying they were from anyone (except msn/hotmail to msn/hotmail for some reason but that's not a problem for me)

 

But when i reply to the email, it doesn't get through to the recipient. Even though their email address is right (granted it didn't come from them but it's going back to the right address yeah?)

 

Do emails store some sort of information for where to send the email when replying other than an email address?

 

 

Thanks

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.