2 of 2
2
sendmail and infomaniak
Posted: 04 December 2009 02:12 PM   [ Ignore ]   [ # 19 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  26092
Joined  05-14-2004

We have a formal structure for that kind of request if needed.  I’ll let you know if that becomes necessary.

Thanks!

 Signature 
Profile
MSG
 
 
Posted: 04 December 2009 03:19 PM   [ Ignore ]   [ # 20 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  16186
Joined  05-20-2002

Just for a really quick test- can you ftp in and edit system/core/core.email.php around line 55:

var $safe_mode        FALSE;
change to
var $safe_mode        TRUE

Then make sure debug is on, email is set to use php mail, and try one more time to send from communicate.

Any difference?

 Signature 
Profile
 
 
Posted: 05 December 2009 12:59 AM   [ Ignore ]   [ # 21 ]  
Grad Student
Rank
Total Posts:  44
Joined  03-22-2009

I get always the same answer.

I can add that safe mode is off on the servers of my host. You can have here an eye on the phpinfo.

Profile
 
 
Posted: 07 December 2009 10:59 AM   [ Ignore ]   [ # 22 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  16186
Joined  05-20-2002

Curiouser and curiouser.  Think it’s time to escalate further- I’ve dropped you an email with the detals.

 Signature 
Profile
 
 
Posted: 11 December 2009 04:40 PM   [ Ignore ]   [ # 23 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  16186
Joined  05-20-2002

And to clarify for the listening public- it looks like the host has some restrictions on email to prevent spam.  One of those restrictions is that the 5th parameter in mail() can’t be specified.  Since EE sets that ‘from’ param (unless safe mode is on), all the emails using php mail failed.

And- opopen is disabled- which means sendmail will fail too.

We can’t do much to get sendmail working with that set up.  However- we can pretty easily hack our way around the php mail restrictions.  We can’t override safe_mode in the constructor (which is what I tried when I had you set var $safe_mode = TRUE; - as later in the script it’s redefined.  But- if we set to true and then comment out that redefinition in core/core.email.php around line 121:

//$this->safe_mode = (ini_get("safe_mode") == 0) ? FALSE : TRUE; 

safe_mode is treated as true, no 4th/5th params are set- and email works!

It’s slightly annoying to have to hack.  But as long as the server errors when sent a 5th param, it’s the way to go.

 Signature 
Profile
 
 
Posted: 11 December 2009 05:03 PM   [ Ignore ]   [ # 24 ]  
Grad Student
Rank
Total Posts:  44
Joined  03-22-2009

I add a part of your last e-mail. The hack you just gave is for 1.x.

For 2.x, in system/libraries/Email.php:

Line 54: set _safe_mode to true

var $_safe_mode        TRUE

Line 94- comment it out

//$this->_safe_mode = ((boolean)@ini_get("safe_mode") === FALSE) ? FALSE : TRUE; 

Line 130 - comment it out

//$this->_safe_mode = ((boolean)@ini_get("safe_mode") === FALSE) ? FALSE : TRUE; 

Thank you for your help!

Kindly,

Profile
 
 
Posted: 11 December 2009 05:52 PM   [ Ignore ]   [ # 25 ]  
Chancellor's Fellow
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  30388
Joined  04-29-2002

So all is well, now?

Profile
MSG
 
 
Posted: 11 December 2009 05:53 PM   [ Ignore ]   [ # 26 ]  
Grad Student
Rank
Total Posts:  44
Joined  03-22-2009

All is perfect. You can close!

Profile
 
 
Posted: 11 December 2009 07:27 PM   [ Ignore ]   [ # 27 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  26092
Joined  05-14-2004

Glad to hear Robin was able to get you fixed up, Xocs. Thanks for working with us on this!

If anything else comes up, please start a new thread.

 Signature 
Profile
MSG
 
 
   
2 of 2
2