| Author |  | 
      
        | sangam100 Newbie
 
  
 
 Joined: 16 March 2009
 Online Status: Offline
 Posts: 14
 | 
          Hi all,
           | Posted: 17 March 2009 at 10:13pm | IP Logged |   |  
           | 
 |  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 |     | 
       
       
        |  | 
        | Igor AfterLogic Support
 
  
 
 Joined: 24 June 2008
 Location: United States
 Online Status: Offline
 Posts: 6168
 | 
          You'll need to edit a function in BaseWebMailActions.cs file:
           | Posted: 18 March 2009 at 8:39am | IP Logged |   |  
           | 
 |  
 
| 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 |     | 
       
       
        |  |