+ Start a Discussion
Apex developer 21Apex developer 21 

attach attachments from notes & attachments from Quote record

I have this visualforce emailtemplate where i can send the attachments on quotes as a link but the receiver needs to be logged in. How do i manage this whitout a login. Or can i send the body of the attachment with the mail. Here is my code:
<messaging:emailTemplate recipientType="Contact"
    relatedToType="Quote"
    subject="Attachment for Quote: {!relatedTo.name}"
    replyTo="test@test.nl">

    <messaging:htmlEmailBody >
        <html>
            <body>
            <p>Dear {!recipient.name},</p>
            <p>Quote</p>
            <center>
             <p>..   ..</p>
            </center>
        <br/>
        <apex:repeat var="cx" value="{!relatedTo.Attachments}">
          <a href="{!URLFOR($Action.Attachment.Download, cx.Id)}" target="_blank" styleClass="btn">Download {!cx.Name}</a>
        <br/>
        </apex:repeat>
            </body>
        </html>
    </messaging:htmlEmailBody>
</messaging:emailTemplate>