vinnybear Posted August 15, 2007 Share Posted August 15, 2007 This script is supposed to send an email: 1. to the company, informing them of an upload from the website 2. to the customer, giving them confirmation of their upload It does this by using variables that are returned from a flash form that also does the uploading. The file uploads fine, the first email is sent, but the second one is not sent. I have determined that the error must be in the php, so here it is: (thanks for any help!) <? // Enter your contact email address here $adminaddress = "vllora@emediagrp.com,vinny@genesisstudios.net"; // Enter the address of your website here include http://www. $siteaddress ="http://www.emediagrp.com"; // Enter your company name or site name here $sitename = "emediagroup"; /******************************************************* THIS IS HOW WE GET OUR RESPONSE WHEN A CUSTOMER SUBMITS FILES *********************************************************/ $date = date("m/d/Y H:i:s"); if ($REMOTE_ADDR == "") $ip = "no ip"; else $ip = getHostByAddr($REMOTE_ADDR); if ($action != ""): mail("vllora@emediagrp.com,vinny@genesisstudios.net","New File Upload from $name at $company", "$name from $company has uploaded files. Customer Info Name: $name Company: $company Email: $email Telephone: $phone Special Instructions: $message File Details: $filedetails Logged Info : ------------------------------ Using: $HTTP_USER_AGENT Hostname: $ip IP address: $REMOTE_ADDR Date/Time: $date","FROM:$email"); /*************************************************************** HERE IS THE SETUP FOR THE AUTOMATIC CUSTOMER RESPONSE ****************************************************************/ if ($action != ""): mail("$email","We have received your files!", "Hi $name, Thank you for your file submission! Here is the information we have received. Customer Info Name: $name Company: $company Email: $email Telephone: $phone Special Instructions: $message File Details: $filedetails Thank you for choosing emediagroup! $sitename $siteaddress","FROM:vllora@emediagrp.com,vinny@genesisstudios.net"); endif; ?> Quote Link to comment https://forums.phpfreaks.com/topic/65060-need-help-with-a-mailupload-script/ Share on other sites More sharing options...
frost Posted August 15, 2007 Share Posted August 15, 2007 Can you do a "FROM" from 2 email addresses? FROM:vllora@emediagrp.com,vinny@genesisstudios.net Maybe change that to one email and see what happens? Quote Link to comment https://forums.phpfreaks.com/topic/65060-need-help-with-a-mailupload-script/#findComment-324727 Share on other sites More sharing options...
vinnybear Posted August 15, 2007 Author Share Posted August 15, 2007 i am not sure if you can do a "FROM" 2 email addresses, but I changed it, and it did not change anything. any other thoughts? Quote Link to comment https://forums.phpfreaks.com/topic/65060-need-help-with-a-mailupload-script/#findComment-324763 Share on other sites More sharing options...
frost Posted August 15, 2007 Share Posted August 15, 2007 Try this: if ($action != "") { mail("vllora@emediagrp.com,vinny@genesisstudios.net","New File Upload from $name at $company", "$name from $company has uploaded files. Customer Info Name: $name Company: $company Email: $email Telephone: $phone Special Instructions: $message File Details: $filedetails Logged Info : ------------------------------ Using: $HTTP_USER_AGENT Hostname: $ip IP address: $REMOTE_ADDR Date/Time: $date","FROM:$email"); } /*************************************************************** HERE IS THE SETUP FOR THE AUTOMATIC CUSTOMER RESPONSE ****************************************************************/ if ($action != "") { mail("$email","We have received your files!", "Hi $name, Thank you for your file submission! Here is the information we have received. Customer Info Name: $name Company: $company Email: $email Telephone: $phone Special Instructions: $message File Details: $filedetails Thank you for choosing emediagroup! $sitename $siteaddress","FROM:vllora@emediagrp.com,vinny@genesisstudios.net"); } Quote Link to comment https://forums.phpfreaks.com/topic/65060-need-help-with-a-mailupload-script/#findComment-324786 Share on other sites More sharing options...
vinnybear Posted August 15, 2007 Author Share Posted August 15, 2007 sorry, that still did not work... here is the page where it is in use (click on the upload button) http://www.genesisstudios.net/emedia/ below is the email that i get from the php, showing that the php is working, and from the information in the email, also that flash is delivering the variables correctly to the php, including the customer's email address. alotta fagina from richie cunningham co. has uploaded files. Customer Info Name: alotta fagina Company: richie cunningham co. Email: vinny@llorafam.com Telephone: afsdf Special Instructions: aasdf File Details: filename: 100_6046.JPG size: 1.510952 MB last modified: Tue Aug 7 18:39:52 GMT-0400 2007 upload started upload complete Logged Info : ------------------------------ Using: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6 Hostname: 71-12-214-095.dhcp.spbg.sc.charter.com IP address: 71.12.214.95 Date/Time: 08/15/2007 05:51:18 Quote Link to comment https://forums.phpfreaks.com/topic/65060-need-help-with-a-mailupload-script/#findComment-324882 Share on other sites More sharing options...
vinnybear Posted August 15, 2007 Author Share Posted August 15, 2007 i am not exactly sure what it was, but it is working perfectly now. i went back to the original script and re-customized it. here it is: <? /******************************************************* Enter your site details below! *******************************************************/ // Enter your contact email address here $adminaddress = "vllora@genesisstudios.net"; // Enter the address of your website here include http://www. $siteaddress ="http://www.emediagrp.com"; // Enter your company name or site name here $sitename = "emediagrouup"; /******************************************************* THIS IS HOW WE GET OUR RESPONSE WHEN A CUSTOMER SUBMITS FILES *********************************************************/ $date = date("m/d/Y H:i:s"); if ($REMOTE_ADDR == "") $ip = "no ip"; else $ip = getHostByAddr($REMOTE_ADDR); if ($action != ""): mail("vllora@emediagrp.com,vinny@genesisstudios.net,vincent.llora@bi-lo.com","New File Upload from $name at $company", "$name from $company has uploaded files. Customer Info Name: $name Company: $company Email: $email Telephone: $phone Special Instructions: $message File Details: $filedetails Logged Info : ------------------------------ Using: $HTTP_USER_AGENT Hostname: $ip IP address: $REMOTE_ADDR Date/Time: $date","FROM:$email"); /*************************************************************** HERE IS THE SETUP FOR THE AUTOMATIC CUSTOMER RESPONSE ****************************************************************/ mail("$email","We have received your files!", "Hi $name, Thank you for your file submission! Here is the information we have received. Customer Info Name: $name Company: $company Email: $email Telephone: $phone Special Instructions: $message File Details: $filedetails Thank you for choosing emediagroup to be your business partner! $sitename $siteaddress","FROM:vinny@genesisstudios.net"); endif; ?> thanks for your effort! Quote Link to comment https://forums.phpfreaks.com/topic/65060-need-help-with-a-mailupload-script/#findComment-324916 Share on other sites More sharing options...
frost Posted August 16, 2007 Share Posted August 16, 2007 Well I am glad it worked. Please remember to mark this topic as solved. Quote Link to comment https://forums.phpfreaks.com/topic/65060-need-help-with-a-mailupload-script/#findComment-325758 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.