PDA

View Full Version : Using FormMail to send to user@otherdomain.com


paulk
02-09-2004, 11:30 PM
This is my first question in this forum. I am impressed with the overall quality of the support posted here, so thanks in advance.

I have been following a formmail thread from 1-28-2003 from Mickey (within FormMail) that has helped me solve most but not all my problems.

In short, I have a form on my site that I want joe websurfer to fill in and have is sent to my.customer@hisdomain.com. My form is essentially an email forwarding system that just adds my subject heading such that mycustomer knows this email came via my site.

1) I have learned that I need to add mycustomer@hisdomain.com to my "recipients" list within FormMail.cgi

2) I do not add hisdomain.com to "referers"

3) I placed my custom FormMail.cgi into a created "cgi-bin" directory

4) I have successfuly directed my form to find and execute the file and I made sure that my permissions were set to 755 which I did via my file manager

I now get an error I cannot troubleshoot. After hitting submit on my form I get the following error message:

" The server encountered an internal error or misconfiguration and was unable to complete your request. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

I get no further error information when I go into my control panel error log folder.

I feel I must have a syntax error within my FormMail.cgi script but ALL that I changed was the referers and recipients areas. Here is a censored copy of my script:

$mailprog = 'usr/sbin/sendmail -i -t';

@referers = ('mydomain.com','mydomain.net');

@recipients = ('^my\.customer\@hisdomain\.com','^my.2ndcustomer\@2nddomain\.com');


What am I doing wrong???????????

Thanks, Paulk

TomD
02-10-2004, 01:46 AM
I'll start by saying I don't use FormMail I write my own PHP scripts to handle forms. I find that a lot more flexable.

There is an HR FAQ on FormMail (http://support.hostrocket.com/index.php?page=index_v1&c=25) .

In addition there is a WEB site for FormMail at http://www.scriptarchive.com/formmail.html .