Jump to content

Recommended Posts

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;

 

?>

Link to comment
https://forums.phpfreaks.com/topic/65060-need-help-with-a-mailupload-script/
Share on other sites

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");
}

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

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!

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.