Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: Change Source and Build in VS2005 Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
sangam100
Newbie
Newbie


Joined: 16 March 2009
Online Status: Offline
Posts: 14
Posted: 17 March 2009 at 10:13pm | IP Logged Quote sangam100

Hi all,
I want to change the source code of the webmail lite for asp.net. But building from Visual Studio 2005 is giving me some errors. The errors are as follows:

Error 1     Could not load type 'PlugIns_Security_main'.     C:\Doc uments and Settings\sangam\My Documents\Visual Studio 2005\WebSites\webmail_net\WEB\AdminPanel\PlugIns\Security\ma in.ascx     1

Error 2     Could not load type 'PlugIns_Security_security_settings'.     ; C:\Documents and Settings\sangam\My Documents\Visual Studio 2005\WebSites\webmail_net\WEB\AdminPanel\PlugIns\Security\se curity_settings.ascx     1

I did search over internet for the problem but with no luck. Has anyone tried this before to modify the source and build it?

I have been trying all these for the signature feature in the webmail lite. Otherwise I have installed and run the project from my localhost and it is working well.     

Any help, guideline towards accomplishing signature for the mail that are sent will be highly appreciated.

Thanks in advance.
Back to Top View sangam100's Profile Search for other posts by sangam100
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6087
Posted: 18 March 2009 at 8:39am | IP Logged Quote Igor

You'll need to edit a function in BaseWebMailActions.cs file:
Code:
public void SendMessage(MailMessage msg)
  {
    if (_acct != null)
      {
        Smtp.SendMail(_acct, msg);
      }
    else
      {
        if (_acct == null)
           Log.WriteLine("NewMessage", "Account is null.");
           throw new WebMailSessionException((new  WebmailResourceManagerCreator()).CreateResourceManager().Get String("SessionIsEmpty"));
      }
  }


It should look like this:
Code:
public void SendMessage(MailMessage msg)
  {
    if (_acct != null)
      {
        msg.BodyHtmlText += "some text";
        /*or*/
        msg.BodyPlainText += "some text";
        Smtp.SendMail(_acct, msg);
      }
    else
      {
        if (_acct == null)
        Log.WriteLine("NewMessage", "Account is null.");
        throw new WebMailSessionException((new  WebmailResourceManagerCreator()).CreateResourceManager().Get String("SessionIsEmpty"));
      }
  }


Depending on whether you need to add text to plaintext or HTML message body, add text to BodyPlainText or BodyHtmlText.

As to error messages you receive, it looks like you are trying to recompile Admin Panel. But it's not necessary to implement changes you need as WebMail and AdminPanel are different applications.

Regards,
Igor
Back to Top View Igor's Profile Search for other posts by Igor
 

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