Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# swilliam 3/10/2007 4:52 PM
Dear All

Would it be a good idea to add a property IsHtml to Cuyahoga.Core.Service.Email.SmtpNet2EmailSender ? From scanning the source code, it looks like it can only send plain text emails.

IEmailTemplateEngine is interesting, too. I have a similar interface that takes a different approach:

string GetTemplateText(string templateName, Hashtable data);

I only use a template for the body text as subject text is generally trivial (I'll generally get the text from the resource files and do a String.Format() supplying the properties in {0}, {1} etc). I pass in data as a Hashtable to make the templates more flexible. I have one template engine that uses NVelocity (ships with Castle) and one that uses XSLT. If you have complex data, passing string values doesn't work very well.

Many thanks

Simon
# martijnb 3/13/2007 5:12 PM
I think, for more complex emails, it would be wise to just create a new IEmailSender implementation. We now have the perfect infrastructure (Castle Windsor) for this to make it configurable.

Also, this way, you have complete freedom by implementing your own version that does magic tricks with templates and stuff. If you might consider contributing it, we can include multiple email senders, so users have a choice :).