• RStevens
  • NEWBIE
  • 25 Points
  • Member since 2007
  • Salesforce

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 5
    Replies

My email template (below) works fine when using the "preview" function to populate the Recipient (WhoID) and RelatedTo (WhatID)  - but when a workflow rule triggers the emai lto be sent, it comes back blank as if it's not resolving the who or what correctly. .

Code:
<messaging:emailTemplate recipientType="Contact"
    relatedToType="Account"
    subject="Your website Access"
    replyTo="anaddress@us.com" >

    <messaging:htmlEmailBody >        
    <html>
        <body>
        <p>Hello {!recipient.name}--</p>
        <p>Here is a list of the website access you users currently have for account {!relatedTo.name}:</p>
    <apex:datatable cellpadding="5" var="cts" value="{!relatedTo.Contacts}">
        <apex:column value="{!cts.Name}" headerValue="Name"/>
        <apex:column value="{!cts.Seat_Holder__c}" headerValue="Website Program Access"/>
        <apex:column value="{!cts.Email}" headerValue="Email" />
        <apex:column value="{!cts.Phone}" headerValue="Phone" />
    </apex:datatable>
        </body>
    </html>
    </messaging:htmlEmailBody> 
</messaging:emailTemplate>



I created a simple workflow rule that's called whenever a contact is edited. The workflow rule uses an email alert. The email Alert uses this template. I've checked to make sure the email template is for Contact objects, and that the Recipient is specified as Email Field: Email.

I must be missing something obvious..... any ideas?




Message Edited by icemft1976 on 10-24-2008 09:28 AM

Here is the issue:

 

1. Narrowed the problem down to a few accounts

2. Email shows as being placed in the Queque when looking at the debug logs, no errors noted

3. Only occurs in one specific trigger and template (same trigger and template works for other case

 

Customer logs into portal or admin into the org and enters a new case comment. If it is flagged as Public the Public case comment trigger fires and if private the private case comment trigger fires.

 

Now, if it is public, and only for specific case related to specifc account the email is created, shows in the debug log, but never gets sent. The same trigger and template works for other cases / account, the private comment trigger works as well and is only slightly different.

 

Now if I associate the case with a different account and NOTHING else changes, the email get sent fine......

 

The reason I am having such a hard time even knowing which accounts this is occuring with is that once the email is sent to the queque, there is no debug information as it is all on Salesforce servers....

 

Has anyone seen anything similar or have any ideas?

We have a custom email to case solution setup using Apex Email Services and have been seeing the following error once a week sent to the address specified for error routing:

 

+++++++++++

The attached message was sent to the Email Service address <e2c@xxxxxxxxxxx.in.salesforce.com> but could not be processed because the following error occurred:

 

554 Domain contains illegal character

+++++++++++

 

According to Salesforce.com support, the issue lies in the Apex Class specified in the email service.  I find this difficult to understand as the error makes no mention of either the class name or the namespace it originates from.  A careful examination of failed emails revealed no apparent RFC issues with the domain names in any of the email fields.  My understanding is that the Apex Email Service parses the email fields out (Subject, Text Body, From, To, etc.) and the Apex Class references that.

 

I would appreciate any thoughts on this.

Hi:
   Just wondering, can you prefill an email template, Every Contact record for one Account on the To: field through Visual Force ? If yes, does anyone have an example of this?
Thanks
Happy New Year...

My email template (below) works fine when using the "preview" function to populate the Recipient (WhoID) and RelatedTo (WhatID)  - but when a workflow rule triggers the emai lto be sent, it comes back blank as if it's not resolving the who or what correctly. .

Code:
<messaging:emailTemplate recipientType="Contact"
    relatedToType="Account"
    subject="Your website Access"
    replyTo="anaddress@us.com" >

    <messaging:htmlEmailBody >        
    <html>
        <body>
        <p>Hello {!recipient.name}--</p>
        <p>Here is a list of the website access you users currently have for account {!relatedTo.name}:</p>
    <apex:datatable cellpadding="5" var="cts" value="{!relatedTo.Contacts}">
        <apex:column value="{!cts.Name}" headerValue="Name"/>
        <apex:column value="{!cts.Seat_Holder__c}" headerValue="Website Program Access"/>
        <apex:column value="{!cts.Email}" headerValue="Email" />
        <apex:column value="{!cts.Phone}" headerValue="Phone" />
    </apex:datatable>
        </body>
    </html>
    </messaging:htmlEmailBody> 
</messaging:emailTemplate>



I created a simple workflow rule that's called whenever a contact is edited. The workflow rule uses an email alert. The email Alert uses this template. I've checked to make sure the email template is for Contact objects, and that the Recipient is specified as Email Field: Email.

I must be missing something obvious..... any ideas?




Message Edited by icemft1976 on 10-24-2008 09:28 AM