Title: JMail: how to save an attachment

Hello

when i send an email with an attachment, how can i save the attachment to a folder on the webserver?

when i try this, i always get number of attachments: 0.

        Response.Write("Number of Attachments: <b>" & msg.Attachments.Count & "</b><br>")
        If msg.Attachments.Count > 0 Then
        Response.Write("Attachment name: <b>" & msg.Attachments(0).Name & "</b><br>")  
                Response.Write("Attachment size: <b>" & msg.Attachments(0).Size & "</b> bytes<br>")
                Response.Write("Attachment type: <b>" & msg.Attachments(0).ContentType & "</b><br>")
                If Left(msg.Attachments(0).ContentType,10) = "text/plain" Then
            Response.Write("Attachment content: <b>" & msg.Attachments(0).Data & "</b><br>")
        End If
    End If

thanks for your help and best regards,

andy

Reply via email to