Forum Moderators: phranque

Message Too Old, No Replies

Server email issue, desperately need help!

         

whatson

7:07 pm on Oct 17, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Before I go completely insane, I really need some help.
I used to have my site hosted with Godaddy, but then I have moved to another company.

Since the move the email in my php form only works for some email addresses. And when I receive an email from the form, it says from myemail@email.com via server.address.com

I don't know why it is saying the via part of the from email.
I have experimented a little with the headers, but with no luck.
Is it possibly something to do with the php.ini file?

wilderness

9:28 pm on Oct 17, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This is more likely addresses in the PHP Forum.

It's likely that the form/script your using inserts the name, and even offers a configuration line (see script instructions) for changing that name to what ever you desire.

whatson

9:36 pm on Oct 17, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



$to = "example@gmail.com";
$subject = "enquiry from site";
$message = "You have an enquiry";
$from = "sales@mysite.com";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";

Is this what I need to change? If so what to?

wilderness

10:00 pm on Oct 17, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



"Is this what I need to change?"

I've no idea what you need to change.

I use a downloaded PHP form that contains full instructions and is much more than a few lines of the PHP you've provided.

There must been hundreds or thousands of form variations that are available (most for free).