| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#16
|
||||
|
||||
|
Quote:
and that anti virus is blocking the outgoing emails. you'll have to stop the anti virus and find other one, suitable for servers. |
|
#17
|
|||
|
|||
|
file attachment
Hi,
I have been using the following code for my contact us page where visitors fill up information and I receive the same in our email. Now I want the visitors to add an attachment along with the information they are sending through the form. Can you provide me the necessary code to be incorporated in the existing code. Also the file type for attachment will be only .txt or .doc or .rtf and also want to limit the size of the attachment. Please help me out. Code:
<html>
<head>
<head>
<title>application</title>
</head>
<body>
<%
Response.Buffer = True
Dim sMsg
Dim sTo
Dim sFrom
Dim sSubject
Dim sTextBody
Dim sHTMLBody
sTo = "abc@abc.com"
sFrom = Request.Form("email")
sSubject = "Application"
sHTMLBody = "<h2>Application</h2>"
sHTMLBody = sHTMLBody & "<br><br><b>Name: </b>" & Request.Form("name")
sHTMLBody = sHTMLBody & "<br><br><b>Email: </b>" & Request.Form("email")
Set objMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
objCDOSYSCon.Fields("(URL address)") = "mail.abc.com"
objCDOSYSCon.Fields("(URL address)") = 25
objCDOSYSCon.Fields("(URL address)") = 2
objCDOSYSCon.Fields("(URL address)") = 60
objCDOSYSCon.Fields.Update
Set objMail.Configuration = objCDOSYSCon
objMail.From = sFrom
objMail.To = sTo
objMail.Subject= sSubject
objMail.HTMLBody = sHTMLBody
objMail.Send
Set objMail = Nothing
Response.Redirect("thanks.html")
%>
</body>
</html>
|
|
#18
|
||||
|
||||
|
sorry, I can't provide you the whole code because I'm not working for
you and I don't have time. you need two steps: first step, upload the file. you can do that with any of the upload scripts/components available, you have one in this Code Bank that is more fit for images but can upload anything you want. step two is relevant here in this thread: taking the file that was just uploaded and adding as attachments. when you have first step completed and working come back here and I can guide you further. if you need help with uploading please start new thread with more details - uploading is not related in any way to sending emails. |
|
#19
|
|||
|
|||
|
Quote:
I am working with a remote server, just guide me with the necessary steps for this. |
|
#20
|
||||
|
||||
|
Quote:
|
|
#21
|
|||
|
|||
|
Quote:
I am not a programmer but you being a master programmer, can't you HELP me? And forums have been created to serve this purpose. |
|
#22
|
|||
|
|||
|
Quote:
I am not a programmer but you being a master programmer, can't you HELP me? And forums have been created to serve this purpose. |
|
#23
|
||||
|
||||
|
Quote:
for complete "black box" code you have different websites. |
|
#25
|
||||
|
||||
|
Quote:
![]() |
|
#26
|
|||
|
|||
|
How come I got an Syntax error?
Quote:
EDIT: Problem fixed, I accidentally put the function in a loop.
__________________
[Video] 7 Devastating Effects of Oil Depletion Why Beautiful Young Women Can't Marry Rich and Powerful Men Your Birthday Cake Sucks! For more interesting reads, visit IcyBlog. |
|
#27
|
|||
|