Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Server Side Mail Script

Status
Not open for further replies.

blondy

IS-IT--Management
May 7, 2002
16
AU
Hi folks,

I need to have the contents of a form sent via email. I don't want to use the dodgy mailto: as most of my users don't have a mail client set up on their machine. I know that using a scripting language is the answer but I'm having trouble making it work. I am using PHP on W2K box which is also running IIS as an SMTP server (not my choice and out of my control). I have had a lot of trouble with changing the php.ini file (nothing I do seems to make any difference) and the only solution that anyone has been able to offer is a complete reload of the OS, apache, php, etc. which I can't do (again this is out of my control).

I wondering if there is a cgi script that would work? I had a look at formmail but i'm pretty sure we do not have a Perl Interpreter.

I have also posted this to the HTML forum, hoping they might have some non-PHP suggestions. Any help would be appreciated.

Cheers,

Therese
 
So, you are running off a W2K box and you have an SMTP server.
Have a look at the phpmailer class - it allows delivery using SMTP hosts:
It might be intimidating at the first look but it is an excellent class worthwhile using.

Otherwise, what happens with the mail() command? Any error messages? When changing the php.ini did you reload IIS?
 
The class files are great but you dont need them if all you want is a simple mail script
The mail function works like this

mail(to whom, subject, body);

mail("abc@yahoo.com,def@hotmail.com","This is the subject", "This is a test mail");

You can write additional headers that says who send the mail , and if the user clicks reply to the email --which email the user will reply to.

an example

mail("abc@mymail.com", "subject","message body","From:wow@wow.com\n Reply-To:wow@wow.com")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top