How to set up a feedback system?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
yuejdesigner85
Forum Newbie
Posts: 4
Joined: Mon Dec 04, 2006 12:45 pm

How to set up a feedback system?

Post by yuejdesigner85 »

I'm trying to make a feedback page where all the data can be send directly to my email. I heard, to do that, I have to set up some kind of email server. Can someone tell me how I can set up a system like that? Thanks a lot in advance!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Email servers and external databases don't really often mix unless forced to. They carry their own database system that manages itself quite often.. so I'm not too sure what you're looking for in the Database board.

Often you don't have to set up an email server specifically either. Under most circumstances your hosting provider will have one already available for you. If you don't want to write the email interaction yourself (it can be quite frustrating) we can certainly recommend libraries that make it much easier and safer. One that we like, because the author is a member and it's solid is Swift.

Hi d. ;)
timclaason
Forum Commoner
Posts: 77
Joined: Tue Dec 16, 2003 9:06 am
Location: WI

Mail Method

Post by timclaason »

This is a mail method I use to send emails:

Code: Select all

function sendmail($toemail, $subject, $message, $senderemail) {
	$this->sendername = "Subject";
	$this->toemail      = $toemail;
	$this->subject = $subject;
	$this->message = $message;
	$this->headers = "From: " . $this->senderemail . "<".$senderemail.">\r\n";
	$this->headers .= 'X-Mailer: PHP/' . phpversion() . "\r\n";
	$this->headers .= 'Bcc: any@email.com'. "\r\n";
	$this->headers .= "MIME-Version: 1.0\r\n" .
			  "Content-Type: text/html; charset=utf-8\r\n" .
			  "Content-Transfer-Encoding: 8bit\r\n\r\n";
	// Send
	mail($this->toemail, $this->subject, $this->message, $this->headers);
}//End Mail Function
It basically uses the mail() function, but makes your front-end code a little cleaner. Otherwise, as posted above, it'd probably be easier to use a pre-written package.
Post Reply