Recent Topics

1 May 09, 2007 05:17    

My b2evolution Version: 1.9.x

I recently installed version 1.9.3 on a windows 2003 server.
Everything runs ok, Its really a greath piece of software! But when I try to send an email to the author using the form. I get the following error:
Sorry, could not send email.
Possible reason: the PHP mail() function may have been disabled on the server.

I'm using a real email account.
Note that I receive the emails to confirmate account, and notifications when a new user registers.

I contacted my hosting provider and they say the PHP mail Function it's enabled on the server.

Is there a bug in version 1.9.x?
Should I install 1.10?
does exist any solution?
Is the windows server the key of the problem?

Thanks in advance

Best regards :D

2 May 14, 2007 22:47

darom,

The problem may be arising from it being a windows server. I'm looking at the [url=http://doc.b2evolution.net/v-1-9/__filesource/fsource_evocore__blogsinc_misc_misc.funcs.php.html#a2233]code that sends the email[/url] and it's supposed to account for at least some strangeness when running on windows. I'm not sure if an upgrade will fix it. It's worth a try and certainly wouldn't hurt anything. I've got to run now but I can help you do some more debugging later. If you're comfortable with php, then backup the file and try playing around with it.

3 May 15, 2007 02:51

Thanks for your answer personman,

I tried version 1.10 and the error persists. So I kept 1.93
Actually, this is my first attempt with php, I used to work with asp (that's the reason for the windows server :'( ). I 'll wait for your help, don't worry for the time.

Best regards :D

4 May 15, 2007 15:38

I'm not sure if this will make a difference, but are you running on IIS or Apache? If IIS, then can you try Apache, just as a test? If you don't want to do that, that's fine with me. This should work on either server.

Also, is the from address for the message on the same domain as the b2evolution install? Your server's smtp may be configured to not send mail whose from address doesn't match the domain.

5 May 16, 2007 01:36

personman wrote:

I'm not sure if this will make a difference, but are you running on IIS or Apache? If IIS, then can you try Apache, just as a test? If you don't want to do that, that's fine with me. This should work on either server.

My server uses IIS 6. I can't try apache.

personman wrote:

Also, is the from address for the message on the same domain as the b2evolution install? Your server's smtp may be configured to not send mail whose from address doesn't match the domain.

I will try this and tell you...

Best Regards :)

6 Jul 17, 2007 03:31

personman wrote:

darom,

The problem may be arising from it being a windows server. I'm looking at the [url=http://doc.b2evolution.net/v-1-9/__filesource/fsource_evocore__blogsinc_misc_misc.funcs.php.html#a2233]code that sends the email[/url] and it's supposed to account for at least some strangeness when running on windows. I'm not sure if an upgrade will fix it. It's worth a try and certainly wouldn't hurt anything. I've got to run now but I can help you do some more debugging later. If you're comfortable with php, then backup the file and try playing around with it.

I am new to B2Evolution and PHP, when I installed on my hosting provider I ran into exactly the same problem. My understanding is that that B2Evolution assumes that your PHP SMTP settings are already preset. I just blogged my solution yesterday because I was not able to immediately post to this forum.

http://www.jackman5.com/blogs/index.php?title=howto_fix_b2evolution_email

This is the fix:

The fix as I implemented it was to add 3 lines to the _advanced.php file in the blogs/conf/ directory:

    //I'm gonna try to fix the e-mail problem using code from the CrystalTech forums
    //I'm interested in how email would work for anyone if these values are not set.
    //Perhaps they are normally set in the PHP.ini file?
    ini_set("SMTP","mail.PutYourSMTPServerNameHere.com");
    ini_set("smtp_port","25"); // assuming standard Port 25 for SMTP
    ini_set("sendmail_from","YourEMailHere@YourDomain.com");

7 Jul 17, 2007 05:45

It still not working for me.
Is there a particular position where I shoud add the script?
I suppose that the windows server must be the problem.

Regards :(

8 Jul 17, 2007 06:24

darom wrote:

It still not working for me.
Is there a particular position where I shoud add the script?
I suppose that the windows server must be the problem.

Regards :(

Bummer, I was hoping that would help others too... I put the lines in the _advanced.php file right under the followig lines:

// If you get blank pages, PHP may be crashing because it doesn't have enough memory.
// The default is 8 MB (set in php.ini)
// Try uncommmenting the following line:
ini_set( 'memory_limit', '16M' );

I'm not an expert in this by ANY means so try this at your own risk, but from looking at the code it looks like you might be able to get more specific error info (maybe more than you want) by changing the following line in the _advanced.php file:

/**
 * Display debugging informations?
 *
 * 0 = no
 * 1 = yes
 * 2 = yes and potentially die() to display debug info (needed before redirects, e-g message_send.php)
 *
 * @global integer
 */
$debug = 0;

It looks to me like setting this value to a 2 will display a backtrace and terminate instead of just giving you the "friendly" error.

I would also look very closely at this line that you added and make sure that you replaced the "mail.PutYourSMTPServerNameHere.com" portion with what you are sure is a valid, accessible SMTP server:

ini_set("SMTP","mail.PutYourSMTPServerNameHere.com");

I also wanted to let you know, my B2Evo is hosted on a Windows server running IIS and PHP5, not Apache, so I don't think Windows is the problem.

9 Jul 18, 2007 23:39

THANKS jackmang!!! :lol:

I receive email notifications now!! I tried with another email account (outside my domain) and it's working now. I can receive notifications when a new user registers or when a someone send feedbacks, but I can't receive emails when someone fill the form to send an email to the author. Do you know if I could fix that? I tried adding your script to the page in htsrv/message_send.php, but nothing. Anyway I disabled that option now.

I hope that this bug (I don't know if it must be call that way)will be fixed in next version, because most hosting providers are limiting their outgoing emails to avoid spam.

10 Jan 29, 2008 06:10

Great, this worked on Win 2003 with WAMP install
ini_set("SMTP","mail.PutYourSMTPServerNameHere.com");
ini_set("smtp_port","25"); // assuming standard Port 25 for SMTP
ini_set("sendmail_from","YourEMailHere@YourDomain.com");

Thank you
Bart


Form is loading...