ASP Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

ASP Examples

ASP String
ASP Byte Array
Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
RSA
S/MIME
SMTP
Socket
Spider
SSH
SSH Tunnel
SSH Key
SFTP
Tar
ASP Upload
XML
XMP
Zip Compression

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
DH Key Exchange
DSA
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
Bzip2
LZW

 

 

 

 

 

 

Code to Download an Email Attachment

Download Chilkat Email ActiveX

ASP code to return an email attachment.

<%

'  This ASP will return an email's Nth attachment.

'  The 1st attachment is at index 0.
attachIdx = 0
'  This is the filename of the .eml on the ASP server.
emlFilename = "testEmail.eml"

'  An email can be loaded into an email object from memory
'  by calling SetFromMimeText, or from a file by calling
'  LoadEml.

'  Create a MailMan object first for the purpose
'  of unlocking the component. (Only one is necessary)
set mailman = Server.CreateObject("Chilkat.MailMan2")
mailman.UnlockComponent "anything for 30-day trial"

set email = Server.CreateObject("Chilkat.Email2")

'  Load an email containing attachments.

'  
success = email.LoadEml(Server.MapPath(emlFilename))
If (success <> 1) Then
    Response.Write email.LastErrorText & "<br>"

End If

'  
Response.ContentType = email.GetAttachmentContentType(attachIdx)

Response.BinaryWrite email.GetAttachmentData(attachIdx)


%>
 

© 2000-2012 Chilkat Software, Inc. All Rights Reserved.