PHP email not working
Page: 1, 2
Just to add to the previuos post. Found this thread regarding the problem.
http://bugs.php.net/bug.php?id=28038
Objecta
http://bugs.php.net/bug.php?id=28038
Objecta
Ilija Studen
on Mar 18. 2007. 5:19 pm
To work around this problem turn on Exchange Compatibility option in Mailing settings (Administration -> Configuration).
activeCollab team member
jrileybowker
on Mar 19. 2007. 7:21 pm
Hi folks-
I installed ActiveCollab on Windows XP, with McAffee virus protection software. Unbeknownst to me, the virus software refused to let me make a connection to my smtp server. I had to uncheck the "prevent mass mailing worms from sending mail" setting to make it work. The tip-off was that I couldn't telnet to my smtp server; the telnet error said the connection was refused.
Hope this is useful to future users.
Regards,
Janet
I installed ActiveCollab on Windows XP, with McAffee virus protection software. Unbeknownst to me, the virus software refused to let me make a connection to my smtp server. I had to uncheck the "prevent mass mailing worms from sending mail" setting to make it work. The tip-off was that I couldn't telnet to my smtp server; the telnet error said the connection was refused.
Hope this is useful to future users.
Regards,
Janet
Getting back to the original question posted by Snailface, I am on VPS server on PHP 5.0.4 and when I send emails from "Tool" section or when a comments are posted, no one is getting an email notification.
I am using the Default PHP Settings Method.
Also, I get no error warnings. Any advice would be greatly appreciated!
:)
I am using the Default PHP Settings Method.
Also, I get no error warnings. Any advice would be greatly appreciated!
:)
Nevermind, I will use my gmail account with the ac thanks to the thread http://www.activecollab.com/forums/topic/832/ .
:)
:)
My default mail options were also not working. As a crappy workaround, I bypassed the Swift mailer object for the native sendmail() approach:
application/models/notifier/Notifier.class.php
The extra "-r $from" was necessary for my host's sendmail install to get the From header working properly. Your mileage may vary.
application/models/notifier/Notifier.class.php
static function sendEmail($to, $from, $subject, $body = false, $type = 'text/plain', $encoding = '8bit') {
Env::useLibrary('swift');
$mailer = self::getMailer();
if(!($mailer instanceof Swift)) {
throw new NotifierConnectionError();
} // if
// Bypass fancy mailer if using sendmail
$mail_transport_config = config_option('mail_transport', self::MAIL_TRANSPORT_MAIL);
if($mail_transport_config == self::MAIL_TRANSPORT_MAIL) {
$headers =
"From: $from\r\n".
"Content-Type: $type; charset=\"{$mailer->charset}\"; format=flowed\r\n".
"Content-Transfer-Encoding: $encoding\r\n";
return mail($to, $subject, $body, $headers, "-r $from");
}
$result = $mailer->send($to, $from, $subject, $body, $type, $encoding);
$mailer->close();
return $result;
} // sendEmailThe extra "-r $from" was necessary for my host's sendmail install to get the From header working properly. Your mileage may vary.
WorldLightMedia
on Oct 30. 2007. 3:55 am
I had this same problem. It was working fine, then it stopped. Here's how I fixed mine:
Go into the email configuration [ Dashboard » Administration » Configuration » Mailing]
and change the "Mail transport" setting to "Default PHP settings". I'm not sure why this works... but it does!
Go into the email configuration [ Dashboard » Administration » Configuration » Mailing]
and change the "Mail transport" setting to "Default PHP settings". I'm not sure why this works... but it does!
I used a cheap hack to fix this problem on my installation. The problem seems to be somewhere with the Swift library. I didn't bother to track it down, I just switched to the standard php mailer. I changed the sendEmail() function in Notifer.class.php line 220 (/application/models/notifier/Notifier.class.php) to this:
static function sendEmail($to, $from, $subject, $body = false, $type = 'text/plain', $encoding = 'utf-8') {
return mail($to,$subject,$body,'From: activeCollab Mailer <'.$from.">\r\n");
//Env::useLibrary('swift');
//$mailer = self::getMailer();
//if(!($mailer instanceof Swift)) {
// throw new NotifierConnectionError();
//} // if
//$result = $mailer->send($to, $from, $subject, $body, $type, $encoding);
//$mailer->close();
//return $result;
} // sendEmail
I commented everything out and added the line "return mail($to,$subject,$body,'From: activeCollab Mailer <'.$from.">\r\n");".
static function sendEmail($to, $from, $subject, $body = false, $type = 'text/plain', $encoding = 'utf-8') {
return mail($to,$subject,$body,'From: activeCollab Mailer <'.$from.">\r\n");
//Env::useLibrary('swift');
//$mailer = self::getMailer();
//if(!($mailer instanceof Swift)) {
// throw new NotifierConnectionError();
//} // if
//$result = $mailer->send($to, $from, $subject, $body, $type, $encoding);
//$mailer->close();
//return $result;
} // sendEmail
I commented everything out and added the line "return mail($to,$subject,$body,'From: activeCollab Mailer <'.$from.">\r\n");".



