History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: CHD-374
Type: Improvement Improvement
Status: Open Open
Assignee: Unassigned
Reporter: Danny Froberg
Votes: 11
Watchers: 7
Operations

Clone this issue
If you were logged in you would be able to see more operations.
Cerberus Helpdesk

Outgoing SMTP Auth Credentials for Groups

Created: 11/Dec/07 04:39 PM   Updated: 08/Jan/12 04:51 PM
Fix Version/s: 5.8

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. Text File cerb5-chd-374.patch (15 kb)
2. Text File cerb5-chd-374_2.patch (17 kb)
3. Text File cerb5-chd-374_3.patch (17 kb)
4. Text File cerb5-chd-374_4.patch (17 kb)

Environment: Any

Value: 2 - Significant Value
Marquee: Mail
Code Impact: Major


 Description   
Groups Preferences needs to include credentials for outgoing SMTP Auth that overrides the default outgoing server credentials.
This is applicable when one cerb4 installation services many companies as a outsourced service.
Emails to the serviced domains fails as fakes.

http://www.cerb4.com/forums/showthread.php?p=1647

 All   Comments   Work Log   Change History      Sort Order:
Comment by Danny Froberg [15/Jan/08 05:01 AM]
Any progress?

Comment by Geoff Staples [07/Aug/08 03:06 PM]
Also needed for email servers such as spam filtering service. Ours white lists when we send an email.

Comment by Jeff Standen [WGM] [28/Feb/09 06:08 PM]
We'll probably need to allow config to define multiple SMTP server profiles. Helpdesk Setup would pick a default outgoing SMTP, and Groups/Buckets could choose a different SMTP to use. This would prevent us needing to input the full SMTP details (host, port, encryption, user/pass, etc) multiple times.

Since it looks like we're going to allow a "From:" address per bucket, this will likely be at the bucket level, and cascade to group or global as needed.

Comment by Jeff Standen [WGM] [12/Aug/09 07:38 PM]

Comment by Robert Middleswarth [13/Aug/09 12:28 AM]
Well doing thing it would be great if you could do this one at the same time since it is just a minor UI tweak.

[Mail Setup] Add an option to disable a mail server on the add screen. It is already on the edit screen.
http://www.wgmdev.com/jira/browse/CHD-1273

Thanks
Robert

Comment by Joe Geck [15/Mar/10 08:34 AM]

Comment by Robert Middleswarth [21/Mar/10 09:04 AM]
Branch with latest Cerb5 patch

http://github.com/rmiddle/cerb5/tree/jira/chd-374

Thanks
Robert

Comment by Robert Middleswarth [24/Mar/10 06:31 AM]
Updated patch. Don't really need 2 fuctions when you can do it in one.

Branch updated as well.

Comment by Joe Geck [06/Apr/10 12:29 PM]

Comment by Robert Middleswarth [14/Apr/10 04:00 PM]
Updated the patch to fix a few typo's that didn't show up in initial testing.

Thanks
Robert

Comment by Bobi R [21/May/10 05:36 AM]
There are a few more errors in the most recent patch cerb5-chd-374_3.patch causing an unexpected T_CONSTANT_ENCAPSED_STRING in /home/www/rosehost/cerberus-gui/api/app/Mail.php when applied to cerb 5.0.0

The following line in the patch is missing a comma so instead of:

+ 'auth_user' => DAO_GroupSettings::get($team_id, DAO_GroupSettings::SETTING_SMTP_AUTH_USER''),

should be

+ 'auth_user' => DAO_GroupSettings::get($team_id, DAO_GroupSettings::SETTING_SMTP_AUTH_USER,''),

and the following line in the patch has one comma too many so instead of:

+ 'enc' => DAO_GroupSettings::get($team_id, DAO_GroupSettings::SETTING_SMTP_ENC,,'None'),

should be

+ 'enc' => DAO_GroupSettings::get($team_id, DAO_GroupSettings::SETTING_SMTP_ENC,'None'),

Comment by Robert Middleswarth [21/May/10 04:47 PM]
Bobi R,

Thanks for the updates. I have been meaning to update those patches. thanks for pointing out my mistakes.

Thanks
Robert

Comment by Robert Middleswarth [21/May/10 07:14 PM]
Updated patch thanks to Bobi R, who fixed a few typos I had left it the previous patch.

Thanks
Robert

Comment by Bobi R [22/May/10 09:15 AM]
There is something seriously wrong with this patch. It simply does not work, emails all ticket replies through the default SMTP server even though there are group SMTP servers configured and tested. I don't know the code very well, but looking at this snippet:

                } else { // regular mail sending
                        try {
                                @$group_smtp = DAO_GroupSettings::get($team_id, DAO_GroupSettings::SETTING_SMTP_IS_ENABLED, 0);
                                // objects
                                $mail_service = DevblocksPlatform::getMailService();
                                if ($group_smtp) {
                                        $mailer = $mail_service->getMailer(CerberusMail::getMailerDefaults());
                                } else {
                                        $mailer = $mail_service->getMailer(CerberusMail::getMailerDefaults($team_id));
                                }
                                $email = $mail_service->createMessage();

Isn't this wrong? Shouldn't the logic for the if statement be opposite of what it is? I mean, if there is $group_smtp then $mailer should be set to getMailer(CerberusMail::getMailerDefaults($team_id), not the other way around, right? This same logic is seen across the entire patch, so I may be wrong. Has this patch ever been tested?

Thanks.

BR

Comment by Bobi R [22/May/10 12:09 PM]
one more error I just found:

                                'max_sends' => DAO_GroupSettings::get($team_id, DAO_GroupSettings::SETTING_MAX_SENDS,20),

should be

                                'max_sends' => DAO_GroupSettings::get($team_id, DAO_GroupSettings::SETTING_SMTP_MAX_SENDS,20),

Please note that this is unrelated to the reversed logic problem in the if statements mentioned in the comment above. The problem with the reversed logic still persists.


Comment by Robert Middleswarth [23/May/10 11:46 AM]
BR,

I had to look at that several times to see you were right I did very limited testing on this patch I see you jumped into the campfire for more debugging. I will be there today(5/23) Sunday until around Midnight and as a general rule Monday - Friday 9:00 AM to 10:00 PM EST.

Thanks
Robert

Comment by Jeff Standen [WGM] [02/Jun/11 07:11 PM]
This should be easier to implement with the Reply-To features in Cerb5 now.