BlogCFC renderer article

The renderer in BlogCFC lets you generate dynamic content in a page or a post. This blog uses it to generate the project page. It pulls an xml feed from RiaForge and displays the result.

I recently wrote an article on how to create a renderer of your own. You can read all about it here:

http://news.blogcfc.com/index.cfm/2011/6/3/Using-the-BlogCFC-Renderer

Till next time...

--Dave

Using gmail hosted email with BlogCFC

My blog is hosted on a shared server.  The ColdFusion administrator is setup to use a generic email account to send email.  This generic account is a hosted gmail account. 

For those that don't know.  You can use gmail for a domain you own.  It is fairly easy to setup and makes it very easy and free for small groups.  You can read all about it here:  http://www.google.com/apps/intl/en/group/index.html

Anyways, where was I.. Oh yes... So, in using gmail to send email via ColdFusion, you have to set it up in a very specific way.  You have to enable enable SSL and TLS and use a specific port.  If these are not setup correctly gmail will reject the email send.

Where I ran into an issue is how BlogCFC is setup for email.  It does not have an option in config or anywhere else to enabled these settings.  So, I just decided to leave the mail stuff out of the blog.ini file and let BlogCFC just use what was in the ColdFusion administrator.

At first this was fine.  However, I noticed something.  (Not sure why I never saw this before but that is another discussion for another day).  Emails were not being sent from my blog.  Upon further inspection I found out that the email account used in the ColdFusion Admin was no longer valid.  I found this as strange considering my blog.ini file has outgoing and owner email addresses.  BlogCFC's emailer should be sending emails out with that info.

I asked a question on the BlogCFC google groups site about this.  I was told by Jason Dean that gmail overwrites the replyto for email.  So, this means that the settings from blog.ini are useless in this scenario.

I decided at this point it was a good idea to modify BlogCFC to handle the gmail mail send issue.  So, what I did was 3 minor things.

  1. I found the 2 mail sending instances that used login info in org/camden/blog/blog.cfc and added this to them: 
    1. usetls="true" usessl="true" port="465"
  2. I made the same change to error.cfm in the site root.
  3. I added mail server and login info to the ini file.

 

That was it.  I ran a couple quick tests and emails were now going out as expected.  These should probably be settings in the config but I didn't go that far with my fix.

I hope this helps someone that runs into this same issue.

Till next time...

--Dave