PDA

View Full Version : Problem with mail script & westhost 2.0.



bdarby
08-01-2004, 12:58 PM
I have just gone through the "manual" upgrade to Westhost 2.0. In fact, I'm still at the temporary location for my new site (DNS have not been changed yet).

I have moved all my site files, and a very simple PHP mail script that takes user input from a flash form, and mails it to my email address is now not working. Works in the old site under Westhost 1.0, but not under Westhost 2.0.

PHP is turned on (I've tried other simple scripts, they work), and the path to my php script is set relatively (../php/mail.php). Here's the script:

<?php
$recipient = "godsendmusic@yahoo.com";
$subject = "php mailer from $name";

mail($recipient,$subject,$message,
"From: $from\r\n" .
"Reply-To: $from\r\n" .
"X-Mailer: PHP/" . phpversion())

?>

Any ideas on why this will not work under Westhost 2.0 client??

Thanks.

bdarby
08-01-2004, 01:06 PM
Correction on what I wrote above:

When the PHP script is written exactly as above, it works perfectly!! It doesn't work when I change the $recipient variable equal to an address that's part of the site in question; meaning something like "$recipient = 'webmaster@bryondarby.com'" Perhapse once the DNS has been changed this script will work correctly?? Even though my old site (under westhost 1.0), and email address still work and function correctly. I don't konw .. i don't get it.

wildjokerdesign
08-01-2004, 01:19 PM
In your Site Manager how do you have your email/ftp set up? I think you are able to access this before the DNS change but can't remember for sure. It could have something to do with that. Although I think you may be right that once you the DNS change happens you'll be ok. FTP into your new 2.0 site and see if maybe there is file called dead.letter in your root directory. It could be you'll find the attempt to send the mail there.

bdarby
08-01-2004, 10:31 PM
Nope .. no dead.letter. I have set up the corisponding email address in westhost 2.0 and given the user ftp privledges. Hopefully the problem will work it self out once the DNS has been changes. Thanks for your help. I will post results.

bdarby
08-02-2004, 10:33 PM
As the new DNS propagated, the problem worked itself out. Infact, my mail box filled with all of my prior attempts running the mail sript.

Thanks for your help WildJoker!

wildjokerdesign
08-03-2004, 05:59 AM
Your welcome. Glad it worked itself out. I should have thought to have you check on the server itself to see if the mail was in the users mailbox. Sounds like it was there all along but since the DNS had not gone through your mail was being checked at the 1.0 site and not the 2.0 yet. That really should have occured to me. :)