Attaching pdf to html email using jmail.appendHTML & JMail.AddAttachment

Discussion in 'Java' started by Vix, Jan 26, 2005.

  1. Vix

    Vix Guest

    Hello - I'm using jmail.appendHTML to create personalised html emails
    within an asp script. I am attching a pdf to the html mail using
    JMail.AddAttachment. The pdf is attached to the mail but the
    attachment paper clip icon doesn't show up.
    From some browsing on groups I think I have to encode the pdf or have
    a contentID.

    Something along the lines of:

    if attachment <> "" then
    contentId3 = jmail.AddAttachment(attachment)

    end if
    ' normal body of html email
    jmail.appendHTML "<META http-equiv=Content-Type: application/pdf
    name=" & contentId3 & """>"
    jmail.appendHTML "<META http-equiv=Content-Transfer-Encoding: base64>"
    jmail.appendHTML "<META http-equiv=Content-disposition: attachment;
    filename=" & contentId3 & """>"

    I'm not really sure what to search on - groups only had 4 items under
    Could anyone help point me in the right direction or perhaps have the
    html to attach a file other than an image?

    Thank you very much

    (There's an article re. lost paperclip in outlookXP but it happens on
    all Outlook versions so I don't think that's problem
    Vix, Jan 26, 2005
    1. Advertisements

  2. You better ask in a Microsoft ASP group, or buy support from Dimac.
    JMail is not JavaMail, and in fact has nothing to do with Java.

    Thomas Weidenfeller, Jan 26, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.