Page 1 of 1

Forward Form no good on Macs? and 1 PC

Posted: Tue Aug 16, 2005 4:38 pm
by hshigs
Hello, I have put together a mp3 download (which works fine) and a form (not working universally) that forwards to any email that I designate. I am using Flash and also PHP. The testing that I have done has shown that the code is consistently working with PC but we are not sure about MAC. Also I am running Firefox but have tested in IE as well. Could there be a piece of code that doesn't work for Mac. I have had it not work on only one PC that I know of. I am new to PHP so any suggestions on corrections to make it work better would be appreciated. You can test the code at http://www.seedsmusic.net and send the email to yourself and see if you are getting it. If you do and you are on a mac please let me know. I got the code from a mailer form I found online, so disregard the notes that is what is wrong.

Also could the problem lie in the PHP edition that is run on a particular server? Due to my test I am thinking this is not the issue but thought I would throw it out there. The page itself should stand alone on any system and when filled out the reciever should be getting the email. So when Mac sends to Mac it is not working, yet when Mac sends to PC it is? i am so confused right now. There must be error in the code.

If anyone has any insight on this it would be greatly appreaciated. Also if you are testing the email forward form on your system the email gets back to you really quick. Thanks for any of your time spent on addressing this questions. Many Blessings!

So here is the PHP...

Code: Select all

<?  

/******************************************************
**
**   PHP Mailer   
**   
*******************************************************/

// Enter your contact email address here
$adminaddress = "$to";

/*******************************************************

No need to change anything below ... 

*******************************************************/

// Gets the date and time from your server
//$date = date("m/d/Y H:i:s");



//Process the form data!
// and send the information collected in the Flash form to Your nominated email address
if ($action != ""): 
mail("$adminaddress","$from", 

"Here is a link to a FREE DOWNLOAD http://www.seedsmusic.net of the song LISTEN TO ME  from the new CD SEEDS OF PURPOSE.  It was sent to you by $name. SEEDS is a family worship CD series containing high-energy songs written from God's word.

Check it out! For more information about SEEDS, go to http://www.seedsmusic.com! If you connect with our vision, help us SPREAD THE WORD!

From: $from 
$from wrote this message: $message





$ip
$date","FROM:$adminaddress"); 

endif;

?>

Posted: Tue Aug 16, 2005 6:50 pm
by nielsene
I suspect the problem is that the headers are too trivial and the email is getting pre-sorted into "Junk".

"FROM:$adminaddress" should probably be "From: $adminaddress" also as all caps won't pass some MTA's out there. Using "$from" as the second argument to mail (which should be the Subject line is also likely to trigger spam/junk mail on a lot of mail clients.

Posted: Wed Aug 17, 2005 12:31 am
by hshigs
I corrected those the code from suggestions made... I think. But still no go on Mac system. Could it still be going to junk mail or spam? If so how can i rewrite the code completely to achieve the desired effect and not have it filtered as SPAM or Junk?here is what I am looking for. A field for entering in email(s) to send outgoing email from PHP file, From field, and message field. I am willing to change the field names to subject and even add fields if you think I need to. Please help! Again, here is the URL http://www.seedsmusic.net if you would like to send a test to yourself. Let me know if you can go Mac to Mac. Here again is the updated PHP code after making suggested changes. not sure I did those right, please correct and help me understand if the changes weren't made correctly. thanks again for you time! Blessings!

Code: Select all

<?  

/******************************************************
**
**   PHP Mailer   
**   
*******************************************************/

// Enter your contact email address here
$adminaddress = "$to";

/*******************************************************

No need to change anything below ... 

*******************************************************/

// Gets the date and time from your server
//$date = date("m/d/Y H:i:s");



//Process the form data!
// and send the information collected in the Flash form to Your nominated email address
if ($action != ""): 
mail("$adminaddress","$subject", 

"Here is a link to a FREE DOWNLOAD http://www.seedsmusic.net of the song LISTEN TO ME  from the new CD SEEDS OF PURPOSE.  It was sent to you by $name. SEEDS is a family worship CD series containing high-energy songs written from God's word.

Check it out! For more information about SEEDS, go to http://www.seedsmusic.com! If you connect with our vision, help us SPREAD THE WORD!

From: $subject
$subject wrote this message: $message





$ip
$date","From:$adminaddress"); 

endif;

?>

Posted: Wed Aug 17, 2005 9:06 am
by nielsene
Are you actually putting a value into the $subject variable?

I would suggest that you look for the "phpMailer" class. Download it and learn to use it. They've put a lot of time into making sure it sets all the right headers, etc.

Posted: Wed Aug 17, 2005 11:09 am
by hshigs
Yes, I am actually using the Subject line for who the email comes from. So whether they enter in a name or email it has something in it. So at the URL in the FLASH the field says from but in the PHP I changed it to $subject. They also can leave it blank I think as well. This form was meant to be simple. So much for that. I will try and check out that PHPmailer class. Hopefully that can shed some light on it. I was hoping to not have to learn a ton of PHP to get this form done. my plan is to learn it eventually. I guess now is as good as time as ever. Any more ideas on this subject would be apprecated still! Thanks for anyone who spends time on it. Many blessings!