Home > ASP Development > Adding an attachment to Email

Adding an attachment to Email



Hi,



Hoping someone can help. I have a form that i have created and i need it to that the user can attach a file then get the form to send the file.



Please have a look at my current code:

[code]

<%

theSchema="http://schemas.microsoft.com/cdo/configuration/"

Set cdoConfig=server.CreateObject("CDO.Configuration")

cdoConfig.Fields.Item(theSchema & "sendusing")=1

cdoConfig.Fields.Item(theSchema & "smtpserver")="***"

cdoConfig.Fields.Update



set cdoMessage=Server.CreateObject("CDO.Message")

cdoMessage.Configuration=cdoConfig

cdoMessage.From="**@**.com"

cdoMessage.To="**@**.com"

cdoMessage.Subject="EMAIL FORM"

strBody = "User: " & request.form("name") & vbCrLf & "Ext: " & request.form("ext") & vbCrLf & "Problem: " & request.form("problem")

cdoMessage.TextBody=strBody

cdoMessage.Send



Set cdoMessage=Nothing

Set cdoConfig=Nothing

%>

    
Guest


--> thread closed.

please dont double post, refer to this thread instead



http://forums.aspfree.com/asp-devel...ail-112380.html

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved