I am using above blog content and this is excellent article on how to send emails through amazon.I tried with html content and was successful.
While if i try using tag in html body i send images are not rendering proper in email.Is it something i am missing here.
public PageReference constructor(){
try{
AWSKeys awsKey = AWSKeys.getInstance(AWSCredentialName);
SES sesEmail = new SES(awsKey.key,awsKey.secret);
List<String> recipients = new List<String>();
recipients.add('[email protected]');
String sender = '[email protected]';
String subject = 'Test message';
Campaign c=[Select c.Id,c.Name,c.Email_Template__r.Template_HTML__c, c.Email_Template__r.Email_Template_Name__c, c.Email_Template__c From Campaign c where id='701i0000000Mk35'];
String body =(c.Email_Template__r.Template_HTML__c).unescapeHtml4();
body=body.replace('{!Campaign.Name}', c.Name);
body=body.replace('{!Campaign.ID}',c.Id);
sesEmail.sendEmail(recipients,sender,subject,body);
}catch(AWSKeys.AWSKeysException AWSEx){
ApexPages.Message errorMsg = new ApexPages.Message(ApexPages.Severity.FATAL, AWSEx.getMessage());
ApexPages.addMessage(errorMsg);
}
Presently i have hardcoded Campaign ID just for testing and html body is in rich text field i have created in my org.Is there a way to render images on browser and send using tag in html content ?