ChillyBanana
Programmer
Hey guys,
I am trying to add an auto response email after when someone completes an inquiry form. The original script works fine which emails the inquiry to a specified email(s). I added the routine to send an email automatically to the email address provided by the user which works... but when I try to assign the "From:" field, it doesn't send the email! Any ideas why? Routine is listed below...
----------------
open (MAIL, "|/usr/lib/sendmail -oi -t"
print MAIL "To: talontire\@videotron.ca\n";
print MAIL "Bcc: webmaster\@talontire.com\n";
print MAIL "From: Ordering Information Page\n";
print MAIL "Subject: Ordering Information for $data{'your_name'}\n\n";
print MAIL "Make: $data{'make'}\n";
print MAIL "Model: $data{'model'}\n";
print MAIL "year: $data{'year'}\n";
print MAIL "Size: $data{'width'} $data{'ratio'} $data{'rim'}\n";
print MAIL "Name: $data{'your_name'}\n";
print MAIL "Order: $data{'order'}\n";
print MAIL "Status: $data{'status'}\n";
print MAIL "Ship Address: $data{'ship_address'}\n";
print MAIL "Ship City: $data{'ship_city'}\n";
print MAIL "Ship Province: $data{'ship_prov'}\n";
print MAIL "Ship Country: $data{'ship_country'}\n";
print MAIL "Ship Postal: $data{'ship_postal'}\n";
print MAIL "Home Address: $data{'home_address'}\n";
print MAIL "Home City: $data{'home_city'}\n";
print MAIL "Home Province: $data{'home_prov'}\n";
print MAIL "Home Country: $data{'home_country'}\n";
print MAIL "Home Postal: $data{'home_postal'}\n";
print MAIL "Day Phone: $data{'day_phone'}\n";
print MAIL "Evening Phone: $data{'evening_phone'}\n";
print MAIL "E-Mail: $data{'email'}\n";
print MAIL "Mailing List: $data{'list'}\n";
print MAIL "Comments: $data{'comments'}\n";
close (MAIL);
# Added routine below!
open (MAIL, "|/usr/lib/sendmail -oi -t"
print MAIL "To: $data{'email'}\n";
print MAIL "From: TalonTire.com\n"; # doesn't work!
print MAIL "Subject: Thank you $data{'your_name'} for you Inquiry/Order at TalonTire.com!\n\n";
print MAIL "Thank you for your recent inquiry to TalonTire.com. One of our tire techs will reply to you within 48 hours. (During peak periods -- April 1 to June 30 and Oct. 20 to Nov. 30 -- we suggest that you provide your phone number(s) in order to shorten the wait.)\n";
print MAIL "\n";
print MAIL "Sincerely,\n";
print MAIL "The TalonTire.com Staff\n";
close (MAIL);
-------------------------
Any help would be greatly appreciated!
Cheers,
Keith
I am trying to add an auto response email after when someone completes an inquiry form. The original script works fine which emails the inquiry to a specified email(s). I added the routine to send an email automatically to the email address provided by the user which works... but when I try to assign the "From:" field, it doesn't send the email! Any ideas why? Routine is listed below...
----------------
open (MAIL, "|/usr/lib/sendmail -oi -t"
print MAIL "To: talontire\@videotron.ca\n";
print MAIL "Bcc: webmaster\@talontire.com\n";
print MAIL "From: Ordering Information Page\n";
print MAIL "Subject: Ordering Information for $data{'your_name'}\n\n";
print MAIL "Make: $data{'make'}\n";
print MAIL "Model: $data{'model'}\n";
print MAIL "year: $data{'year'}\n";
print MAIL "Size: $data{'width'} $data{'ratio'} $data{'rim'}\n";
print MAIL "Name: $data{'your_name'}\n";
print MAIL "Order: $data{'order'}\n";
print MAIL "Status: $data{'status'}\n";
print MAIL "Ship Address: $data{'ship_address'}\n";
print MAIL "Ship City: $data{'ship_city'}\n";
print MAIL "Ship Province: $data{'ship_prov'}\n";
print MAIL "Ship Country: $data{'ship_country'}\n";
print MAIL "Ship Postal: $data{'ship_postal'}\n";
print MAIL "Home Address: $data{'home_address'}\n";
print MAIL "Home City: $data{'home_city'}\n";
print MAIL "Home Province: $data{'home_prov'}\n";
print MAIL "Home Country: $data{'home_country'}\n";
print MAIL "Home Postal: $data{'home_postal'}\n";
print MAIL "Day Phone: $data{'day_phone'}\n";
print MAIL "Evening Phone: $data{'evening_phone'}\n";
print MAIL "E-Mail: $data{'email'}\n";
print MAIL "Mailing List: $data{'list'}\n";
print MAIL "Comments: $data{'comments'}\n";
close (MAIL);
# Added routine below!
open (MAIL, "|/usr/lib/sendmail -oi -t"
print MAIL "To: $data{'email'}\n";
print MAIL "From: TalonTire.com\n"; # doesn't work!
print MAIL "Subject: Thank you $data{'your_name'} for you Inquiry/Order at TalonTire.com!\n\n";
print MAIL "Thank you for your recent inquiry to TalonTire.com. One of our tire techs will reply to you within 48 hours. (During peak periods -- April 1 to June 30 and Oct. 20 to Nov. 30 -- we suggest that you provide your phone number(s) in order to shorten the wait.)\n";
print MAIL "\n";
print MAIL "Sincerely,\n";
print MAIL "The TalonTire.com Staff\n";
close (MAIL);
-------------------------
Any help would be greatly appreciated!
Cheers,
Keith