Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: Q: can I do monitor outgoing emails? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
night-star
Newbie
Newbie
Avatar

Joined: 07 December 2010
Location: Syrian Arab Republic
Online Status: Offline
Posts: 8
Posted: 07 December 2010 at 11:13am | IP Logged Quote night-star

Hello eveybody

I want use the WebMail Lite script in my website, but I want ask you , are there monitor outgoing emails option for admin ? if not can I copy all emails that be send to default email ?

for clarification: I want create group of email accounts for my employees but I want monitors this accounts so I copy all emails that be send and receive to the accounts to default email (I know, I can monitor emails received by forward option but emails sent ?!!)   

I wish anyone give to me help or idea

thank you
Rawaf
Back to Top View night-star's Profile Search for other posts by night-star
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6044
Posted: 07 December 2010 at 11:01pm | IP Logged Quote Igor

It wouldn't be possible to achieve this with WebMail unless the code is heavily customized. I would recommend to hand this kind of tasks over to mail server you are using. Most mail servers allow setting up mail processing rules which seems to be exactly what you're looking for.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
night-star
Newbie
Newbie
Avatar

Joined: 07 December 2010
Location: Syrian Arab Republic
Online Status: Offline
Posts: 8
Posted: 08 December 2010 at 2:46am | IP Logged Quote night-star

thank you Igor for your fast response,

But unfortunately, I asked my mail server provider they haven't this option

so I can create little code (email alerts) for new emails sent by accounts I couldn't find when should I add it ? , it should be process after click send button can you help me ?

thank you
Rawaf
Back to Top View night-star's Profile Search for other posts by night-star
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6044
Posted: 08 December 2010 at 3:27am | IP Logged Quote Igor

You'll probably need to tweak DoSendMessage function found in common/class_processorswitch.php file (line ~2822). Its critical part starts from the condition:

Code:
if (CSmtp::SendMail($_settings, $_account, $_message, null, null))


If that condition returns false, "Can't send message" will be displayed. Use it to add your custom handlers for messages to be sent out.

--
Regards,
Igor, AfterLogic Support

Back to Top View Igor's Profile Search for other posts by Igor
 
night-star
Newbie
Newbie
Avatar

Joined: 07 December 2010
Location: Syrian Arab Republic
Online Status: Offline
Posts: 8
Posted: 08 December 2010 at 9:18am | IP Logged Quote night-star

thank you so much Igor, I will try and if it's ok I will add the code and the way here :)
Back to Top View night-star's Profile Search for other posts by night-star
 
night-star
Newbie
Newbie
Avatar

Joined: 07 December 2010
Location: Syrian Arab Republic
Online Status: Offline
Posts: 8
Posted: 08 December 2010 at 11:39am | IP Logged Quote night-star

Hey,

Yes .. Yes, My code work fine, it's

Code:

$recipient['Email'] = 'ADD YOUR DEFAULT EMAIL ';         &nbs p;     
CSmtp::SendMail($_settings, $_account, $_message, null, $recipient['Email'] );


after change the red text to your own email that will receive all emails that be sent by email accounts , go to

common/class_processorswitch.php file ...

then find DoSendMessage function ..

then find the following code

Code:
$bSaveInSent = (isset($_messageNode->Attributes['save_mail']) && 1 === (int) $_messageNode->Attributes['save_mail']);


and now, add the new code

Code:

$recipient['Email'] = 'ADD YOUR DEFAULT EMAIL ';         &nbs p;     
CSmtp::SendMail($_settings, $_account, $_message, null, $recipient['Email'] );



now, save and test .. it will work fine .

thank you so much Igor for the help , I'm very happy for find this great script

Best regards
Rawaf
Back to Top View night-star's Profile Search for other posts by night-star
 
night-star
Newbie
Newbie
Avatar

Joined: 07 December 2010
Location: Syrian Arab Republic
Online Status: Offline
Posts: 8
Posted: 08 December 2010 at 11:46am | IP Logged Quote night-star

sorry there error in my code

remove the following ( &nbs p; ) it added from forum CODE

sorry, I couldn't fine edit option in forum so please Igor can you edit my last replay ?

thanks
Rawaf
Back to Top View night-star's Profile Search for other posts by night-star
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide