Jump to content

This topic is 7494 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a basic form which makes a submission to a database. Works great.

What I desire is to have an email submitted to a fixed address simultaneously upon submission of the form.

I explored the demo/examples posted on various PHP sites and tried incorporating them into my form, without success. I then tried to just make a form whose sole purpose is to submit an email, and I could not make that work either.

I am using the built-in Apache Server on OSX Jaguar. There was mention in one article of the need to adjust the httpd.config file. Actually the article was about the Windows .ini file. I searched httpd.config but could find none of the lines they mentioned.

Two questions:

1) Could my problem be a matter of adjusting httpd.config, or should those be OK as-is?

2) Could someone point me to an example page (or provide general tips) which does the submit & email combo I desire?

Thanks, as always, for the push.

DSW

Posted

Are you trying to send the email from PHP? Are you using a script like this:

<?php

	$email = $_POST["email"];

	$message = $_POST["message"];

	

	if (mail("[email protected]", "The Subject", $message, "From: " . $email . "rn" . "Cc: [email protected]"))

			{

			include "mailsent.html";

			}

		else

			{

			include "mailerror.html";

			};

?>

If it is not already enabled, you may have to "enable" PHP on your computer by editing the httpd.config file.

Good Luck.

Garry

Posted

Garry,

Thanks for writing back so quickly.

My email send page looks very much like that. I have tried a number of different wrinkles based on the examples I have found and no longer think my coding is the issue here.

Any ideas about where/how I should adjust the httpd.config file? I looked through it and it was not clear to me where I should adjust it.

Thanks again.

DSW

Posted

Garry,

Here is a bit more info on my situation.

PHP version 4.3.2.

phpinfo gives:

Local Value Master Value

sendmail_from no value no value

sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i

SMTP localhost localhost

smtp_port 25 25

I have explored the httpd.conf file too, but haven't found any likely places for making changes to it.

Would you be able to comment on these settings, let me know what changes I might consider, and/or point me towards an info source on this topic?

Posted

You should not need to do anything with httpd.conf

My php mail() stopped working recently when my ISP blocked port 25! This is OK for me because I am just developing here and I have plenty of hosted sites to do the final testing on.

Maybe it is a port 25 issue?

Good Luck.

Garry

This topic is 7494 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.