ColdFusion library for sending emails through Postmark -
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

This is a ColdFusion Component for interacting with the Postmark API.

Free to use, free to change & improve. Please share those changes back with the community. Version 1 was created by Jonathan Lane (

Pretty easy to use. Drop postmarkapi.cfc in with your files and invoke it like so:

<cfinvoke component="postmarkapi" method="sendMail" returnVariable="pmCode">
	<cfinvokeargument name="mailTo" value="YOUR RECIPIENT">
	<cfinvokeargument name="mailFrom" value="SENDING ADDRESS">
	<cfinvokeargument name="mailSubject" value="YOUR SUBJECT">
	<cfinvokeargument name="apiKey" value="YOUR API KEY">
	<cfinvokeargument name="mailHTML" value="<body><h1>It worked!</h1></body>">

Alternatively, the createObject syntax is:

postmark = createObject("component", "");
	,"Email Subject"
	,"<body><h1>It worked!</h1></body>"

The component has 4 required arguments and accepts an additional 4 optional arguments.


  • mailTo: your recipient
  • mailFrom: sending address
  • mailSubject: subject of your message
  • apiKey: the API key for the Postmark "server" you're using


  • mailReply: reply-to address
  • mailCc: CC recipient
  • mailHTML: content of the HTML message body
  • mailTxt: plain text message body

The component returns the status code returned from Postmark.

The component was built against CF 8, but should work fine at least back to CF 6 (not tested though).

Feel free to send me any questions or comments. I'll do my best to answer them.