So, I'm trying to build a link to a visualforce page in an email template and the following works… almost.
The only problem is that I'm getting a non-ssl link (http:// instead of https://)
<a href='{!URLFOR('/apex/SomePage', null, [id=Some_Object__c.Id,retURL="/apex/SomeOtherPage"])}'>Go to SomePage here!</a>
This causes the obvious problem of users having to log in to salesforce every time they click this link even if they are already logged in.
Best Answer
As a workaround, how about
Edit - added colons to the Substitute parameters