Jump to content


activating smtp

  • Please log in to reply
1 reply to this topic

#1 witham

  • Members
  • PipPipPip
  • Advanced Member
  • 86 posts

Posted 02 August 2006 - 06:40 PM

Could anybody please tell me how you activate smtp within the xampp for windows?

#2 tomfmason

  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 03 August 2006 - 05:24 AM

do you mean setting up mecury mail or sending mail via php.

If you mean sending mail via php then use the piece of code.
$knowsender = "you@yourdomain.com";//must be a username known to the mail server
if ($ccaddress=="" || $ccaddress==" ") {
	$header="From: $knownsender";
	$header .="From: $knownsender\r\n";
	$header .=" Cc: $ccaddress";
// $header.="Bcc: $bcaddress";

if (mail($mailtos, $subject, $message, $header)) {
	echo "success";
	echo "Your error";
If you have configured the server right then you shouldn't have to change anything in the php.ini or httpd.conf. Just use this piece of code instead of the standard x-mailer format.

There is one draw back to this. You cannot send the mail with any additional headers(html mail). It will only work for text

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users