You need to sign in to do that
Don't have an account?
Uves Ravat
PDF Content on Actual Email
Hi,
Currently i am sending emails with PDF Attachments. The problem is the user cant edit PDF file so i wanted if possible to still send the PDF file but the data inside the PDF should be also show on the actual email. is that possible?
This is my current code
Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage(); // Reference the attachment page and pass in the account ID PageReference pdf = Page.attachmentProposal; pdf.getParameters().put('id',(String)myProjectId ); pdf.setRedirect(true); // Take the PDF content Blob b = pdf.getContent(); // Create the email attachment Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment(); efa.setFileName(proposalFile); efa.setBody(b); // Adddress String [] toAddresses = new String[] {address}; // Sets the paramaters of the email email.setSubject(subject ); email.setToAddresses( toAddresses ); email.setPlainTextBody('refer attached PDF :'); email.setFileAttachments(new Messaging.EmailFileAttachment[] {efa}); Messaging.SendEmailResult [] r = Messaging.sendEmail(new Messaging.SingleEmailMessage[] {email});
Thanks
I can think on 2 options:
1. There are PDF editor. Users can use them to edit the PDF.
2. Show the user VF page that allowed to insert all the data that the user might need to insert to the PDF.
Then add to this page button 'Create PDF', that will generate PDF file from the data that user insert.
Thanks for the feedback.
I actually want the data to appear on email too, so they can change the what they want and send it back to me via email
Thanks
There is an option to call email template via button (I didn't try, but heard that it's working),
so the button in the page might used to open the screen for selecting template & sending the email.
Link:
http://success.salesforce.com/ideaview?id=087300000006tqzAAA