Hi,
here is a find:
a sendmail for windows available for free at
http://www.dotnetjunkies.com/WebLog/johnwood/archive/2005/01/17/45329.aspx
or
google for "sendmail for windows john wood"
The utility is quite nifty and seems just like sendmail on unix.
One thing is that it seems it requires .Net runtime installed (i am not sure, maybe someone without .Net runtime can just try out the utility and confirm)
The other thing is it takes the name of a file as command line argument, which contains the body text.
Now someone just has to put the code into
class/mail/phpmailer/class.phpmailer.php
in the function sendmail_send() maybe (around line 590)
The code should be something like:
function win_sendmail_send($header, $body) {
//echo "inside win_sendmail_send()";
//to be passed correctly
$this->Sender = "admin@myxoopssite.com";
$mailservername = "mail.myserver.com";
//generating a random file name so that no
//concurrent file access issues arise
$messagefile = "C:/temp/".uniqid().".txt";
$filehandle = "";
//and filling the body text into that file
if(!@$filehandle = fopen($messagefile, "w"))
{
$this->error_handler(sprintf("Could not open %s", $messagefile));
return false;
}
if (fwrite($filehandle, $body) === FALSE) {
$this->error_handler(sprintf("Cannot write to file %s", $messagefile));
return false;
}
fclose($filehandle);
/*
-----quotes do not seem to work -----
$sendmail = sprintf("\"%s\" /s %s /f %s /t \"%s\" /j \"%s\" /m \"%s\"",
*/
$sendmail = sprintf("%s /s %s /f %s /t %s /j %s /m %s",
$this->Sendmail,
$mailservername,
$this->Sender,
$this->to[0][0],
"User activation key for username",
$messagefile);
//echo "\n the whole command :\n$sendmail \n";
exec($sendmail);
//exit();
return true;
}
------------------------------
maybe exec is not a good idea ..... this is far from complete as a patch, obviously. Just to give an idea. I managed to get this code to send myself a activation mails properly.
(Surprisingly, the command string ($sendmail) works properly without quotes for multiword arguments. Needs to be tested.)
************************************
The good thing about this approach of using a sendmail clone is that people testing out XOOPS on Windows (or maybe using XOOPS on WAMP) do not need to setup a mail server on their setup for sending a mail. Setting up Mercury Mail which comes with XAMPP can be quite a task.
************************************
Coming back finally to the discussion on disabling email activation,
stefan88,
I could not find in 2.2.3 what you pointed out, I will have to look harder
Thanks.
HTH,
JS