« Windows Oracle Database Client AnnoyancesVM Hung on Startup »

HOWTO: Fix B2Evolution EMail

07/15/07

Permalink 01:03:39 am by guy, Categories: B2Evolution, PHP

In general (I’m assuming here) B2Evolution email actually works flawlessly. Unfortunately, it wasn’t working for me. I did some Googling (I say that a lot) and found that there are at least a couple of others having the same problem. This is the message I was getting:

Sorry, could not send email.
Possible reason: the PHP mail() function may have been disabled on the server.

I found a forum post on my web hosting provider (CrystalTech) in their PHP forum explaining how to make PHP mail work on their servers. I tried it and it worked. I wanted to post the solution on the B2Evolution forums, but I still have not received my registration so I can’t post yet. Blog it then I say.

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");

September 2017
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
I'm a generalist, at least if I'm honest. In my job I am primarily a developer, but also a sysadmin, and (as little as possible) technical support. I know a little about a lot of things, a lot about some things, and everything about nothing. Here I will post random learnings...

Search

XML Feeds

User tools

blog software