avatar Denny Pro Aug 9. 2009. 8:00 pm
In the past I had problems using the native php mailer so I opted instead to use SMTP, which works fine. I've always wanted to get the native mailing working properly, though, because the interface seems to be a bit snappier with it in place.

My problem occurs when the system sends out notifications after some type of user activity. Those messages never arrive at the recipient's inbox. I turned on debugging and the logs show:

#1 - info - Log level changed to 4
#2 - info - MAIL FROM: <>
#3 - info - 250 Stubbed
#4 - info - RCPT TO: <donetta@---------.org>
#5 - info - 250 Stubbed
#6 - info - DATA
#7 - info - 354 Stubbed
#8 - info - <MESSAGE DATA>
#9 - info -
#10 - info - 250 Stubbed
#11 - info - Message sent to 1/1 recipients

I got a little concerned about line 2 and the "MAIL FROM: <>" part... so I went into admin and submitted a "Test Mail Settings". This e-mail arrived in the GA account inbox as expect. The logs this time show:

#19 - info - MAIL FROM: <denny@-------.com>
#20 - info - 250 Stubbed
#21 - info - RCPT TO: <denny@-------.com>
#22 - info - 250 Stubbed
#23 - info - DATA
#24 - info - 354 Stubbed
#25 - info - <MESSAGE DATA>

Notice this time how the "From" address is populated on line 19. I'm not positive but I'm wondering if Google is rejecting the first e-mail mail because something in the header isn't being included or formatted properly.

So - I was wondering if anyone has experienced problems receiving mail sent from aC to a Google Apps account (using the native mailer option) and if you were able to resolve it. I'm currently running aC v2.2.

I should note that I also use another script that sends via the mail() function and those e-mails are received just fine in the GA accounts.
Denny Cave
Cave Interactive Media
http://caveim.com
avatar Ilija Studen Staff Aug 10. 2009. 11:33 am
In this particular case logging utility displays wrong information - from address is set and sent properly, don't worry (you can check out code in /activecollab/angie/classes/swiftmailer to confirm if you wish).

Which version of activeCollab do you use? If you are using activeCollab 2, but not the latest version (2.1.3), we recommend that you upgrade to the latest version.

Regarding Native mailer vs SMTP performance, SMTP is better in general. Even native mailer goes through SMTP, but configuration is set in php.ini, instead of the application. SMTP is faster when there are multiple emails that need to be sent, because activeCollab reuses connection for that. Native mailer on the other hand connects and disconnects for each email.

Situation when Native mailer is faster than SMTP is when it uses faster (local?) mailing server, but that is something that you can check with your hosting provider (ask them do give you access to local SMTP server).

Basically:

1. Upgrade to the latest version
2. Ask if you can use mailing server provider by the hosting provider, that's in their LAN, instead of using external server

Please let us know how it went.
avatar Henry Weismann Pro Mar 18. 2010. 12:10 pm
Hi,

I was having the same problem and I think I found the issue or atleast where you can do a fix for it. It seems that the return path is in fact not being set try digging into the following file:
activecollab/angie/classes/swiftmailer/Swift.php

Aound line 415 change:
 if (!($has_return_path = $message->getReturnPath())) $message->setReturnPath($from->build(true));

To:
if (!($has_return_path = (!$message->getReturnPath()) || $message->getReturnPath() != "<>")) $message->setReturnPath($from->build(true));


For me the test email area of activecollab actually worked but system emails where still not being sent for discussions comments and others. This was because the test script does not use the batch sending like the others use and the return path was set correctly in the test email. I dont think the test is very accurate way of testing cause it doesnt use the actual functions the rest of the app is using...it calls swift mailer all by itself and just makes sure that your settings are correct.

I dont know if this is a bug in swift or active collab but my guess is that it is a swift bug.

Weird thing is ...is that it worked before but I was on a different server then so maybe some servers require the Mail From header and some don't.

Let me know if this fix solves your problem and maybe Ill report it as a bug in active collab. I did change my files so I am not sure if this is just happening in my system.