tmp/test-doxy-mms/MarekMailSystem/MarekMailSystem2/TestTemplateEmailTable.cs

Go to the documentation of this file.
00001 using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004 using MarekMailSystem2;
00005 
00006 namespace MarekMailSystem2
00007 {
00008     public class TestTemplateEmailTable : IEmailTable
00009     {
00010         public void Save(Email email, string name)
00011         {
00012         }
00013 
00014         public Email Load(string name)
00015         {
00016             switch (name)
00017             {
00018                 case "temp1":
00019                     return new Email(
00020                         "$NAME $SURNAME <$TO>",
00021                         "This is first email template",
00022                         "Hello $NAME, and goodbye.");
00023                 case "temp2":
00024                     return new Email(
00025                         "$SURNAME $NAME<$TO>",
00026                         "This is second email template (to: $TO)",
00027                         "$HEADER\n" +
00028                         "Hello Mr $SURNAME,\n" +
00029                         "Welcome to test email two!\n" +
00030                         "The date is: $DATE\n" +
00031                         "$FOOT");
00032                 default:
00033                     throw new Exception("No such test template in this email table.");
00034             }
00035         }
00036     }
00037 }

Generated on Thu Oct 25 11:32:52 2007 for Marek Mail System by  doxygen 1.5.3-20071008