Re: HTML emails from Objective C
Re: HTML emails from Objective C
- Subject: Re: HTML emails from Objective C
- From: Uli Kusterer <email@hidden>
- Date: Mon, 23 Dec 2013 03:20:00 +0100
On 26 Nov 2013, at 21:16, Bryan Schmiedeler <email@hidden> wrote:
> I am trying to write an HTML email using Objective C.
>
> I have the HTML all done, now I am just putting it into mutable string line by line. I am using / to escape when I need a quote in the HTML.
>
> This I think will work but sure seems tedious. Is there something I am missing, some library that helps with this.
Type your HTML in a text file, put that in your “Resources” folder, then use [[NSMutableString alloc] initWithContentsOfFile: … encoding:…] to load it, and maybe replaceOccurrencesOfString:… to fill in some placeholders? There are also some templating engines for things like this that handle things like filling in values more robustly and handle repeating sections etc.
Cheers,
-- Uli Kusterer
“The Witnesses of TeachText are everywhere...”
http://zathras.de
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden