Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
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  
Old February 12th, 2008, 07:14 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information.
 
Join Date: Sep 2004
Location: Israel
Posts: 26,608 Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)  Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 1 Week 4 Days 12 h 53 m 47 sec
Reputation Power: 1400
Quote:
Originally Posted by jenggot
i was try your code, but still error..anything else for setting?? this error code(failure: The message could not be sent to the SMTP server. The transport error code was 0x800ccc15. The server response was not available )

help me...thx
usually this error is caused when there is anti virus running on the server,
and that anti virus is blocking the outgoing emails. you'll have to stop
the anti virus and find other one, suitable for servers.

Reply With Quote
  #17  
Old February 13th, 2008, 03:54 AM
meenarc meenarc is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 9 meenarc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 25 m 42 sec
Reputation Power: 0
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>

Reply With Quote
  #18  
Old February 13th, 2008, 05:36 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information.
 
Join Date: Sep 2004
Location: Israel
Posts: 26,608 Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)  Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 1 Week 4 Days 12 h 53 m 47 sec
Reputation Power: 1400
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.

Reply With Quote
  #19  
Old February 13th, 2008, 05:41 AM
meenarc meenarc is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 9 meenarc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 25 m 42 sec
Reputation Power: 0
Quote:
Originally Posted by Shadow Wizard
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.



I am working with a remote server, just guide me with the necessary steps for this.

Reply With Quote
  #20  
Old February 13th, 2008, 06:13 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information.
 
Join Date: Sep 2004
Location: Israel
Posts: 26,608 Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)  Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 1 Week 4 Days 12 h 53 m 47 sec
Reputation Power: 1400
Quote:
Originally Posted by meenarc
I am working with a remote server, just guide me with the necessary steps for this.
see your other thread. if you're not programmer, we can't really help you, sorry.

Reply With Quote
  #21  
Old February 13th, 2008, 06:42 AM
meenarc meenarc is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 9 meenarc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 25 m 42 sec
Reputation Power: 0
Quote:
Originally Posted by Shadow Wizard
see your other thread. if you're not programmer, we can't really help you, sorry.


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.

Reply With Quote
  #22  
Old February 13th, 2008, 06:51 AM
meenarc meenarc is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 9 meenarc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 25 m 42 sec
Reputation Power: 0
Quote:
Originally Posted by Shadow Wizard
see your other thread. if you're not programmer, we can't really help you, sorry.


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.

Reply With Quote
  #23  
Old February 13th, 2008, 08:47 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information.
 
Join Date: Sep 2004
Location: Israel
Posts: 26,608 Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)  Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 1 Week 4 Days 12 h 53 m 47 sec
Reputation Power: 1400
Quote:
Originally Posted by meenarc
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.
no, forums were created to aid programmers with their existing code.
for complete "black box" code you have different websites.

Reply With Quote
  #24  
Old February 21st, 2008, 05:01 AM
micky's Avatar
micky micky is offline
Couch Potato Wizard
Click here for more information. Click here for more information
 
Join Date: Jan 2005
Location: India
Posts: 10,179 micky User rank is General 6th Grade (Above 100000 Reputation Level)micky User rank is General 6th Grade (Above 100000 Reputation Level)micky User rank is General 6th Grade (Above 100000 Reputation Level)micky User rank is General 6th Grade (Above 100000 Reputation Level)micky User rank is General 6th Grade (Above 100000 Reputation Level)micky User rank is General 6th Grade (Above 100000 Reputation Level)micky User rank is General 6th Grade (Above 100000 Reputation Level)micky User rank is General 6th Grade (Above 100000 Reputation Level)micky User rank is General 6th Grade (Above 100000 Reputation Level)micky User rank is General 6th Grade (Above 100000 Reputation Level)micky User rank is General 6th Grade (Above 100000 Reputation Level)micky User rank is General 6th Grade (Above 100000 Reputation Level)micky User rank is General 6th Grade (Above 100000 Reputation Level)micky User rank is General 6th Grade (Above 100000 Reputation Level)micky User rank is General 6th Grade (Above 100000 Reputation Level)micky User rank is General 6th Grade (Above 100000 Reputation Level)  Folding Points: 1480 Folding Title: Novice Folder
Time spent in forums: 3 Months 3 Weeks 1 Day 16 h 36 m 26 sec
Reputation Power: 1413
Hey Shad, refering to this thread here, can u edit ur code for adding names to To and From parameters besides email addresses??
__________________
Laziness is my religion and Sunday is my God

Get the Mantra!

Reply With Quote
  #25  
Old February 21st, 2008, 09:27 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information.
 
Join Date: Sep 2004
Location: Israel
Posts: 26,608 Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)  Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 1 Week 4 Days 12 h 53 m 47 sec
Reputation Power: 1400
Quote:
Originally Posted by micky
Hey Shad, refering to this thread here, can u edit ur code for adding names to To and From parameters besides email addresses??
good point, I'll do it soon - keep bugging me (via PM) if you see I'm not doing it...

Reply With Quote
  #26  
Old April 7th, 2008, 05:20 PM
icywave icywave is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Sep 2005
Location: Global Village
Posts: 691 icywave User rank is Sergeant Major (2000 - 5000 Reputation Level)icywave User rank is Sergeant Major (2000 - 5000 Reputation Level)icywave User rank is Sergeant Major (2000 - 5000 Reputation Level)icywave User rank is Sergeant Major (2000 - 5000 Reputation Level)icywave User rank is Sergeant Major (2000 - 5000 Reputation Level)icywave User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 4 Days 22 h 23 m 30 sec
Reputation Power: 31
Send a message via MSN to icywave
How come I got an Syntax error?

Quote:
Microsoft VBScript compilation error '800a03ea'

Syntax error

/includes/send_email.asp, line 9

Function SendEmail(strEmailTo, strEmailFrom, strEmailSubject, strEmailBody, arrAttachments)
^


EDIT: Problem fixed, I accidentally put the function in a loop.

Reply With Quote
  #27  
Old April 7th, 2008, 05:27 PM
icywave icywave is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Sep 2005
Location: Global Village
Posts: 691 icywave User rank is Sergeant Major (2000 - 5000 Reputation Level)icywave User rank is Sergeant Major (2000 - 5000 Reputation Level)icywave User rank is Sergeant Major (2000 - 5000 Reputation Level)icywave User rank is Sergeant Major (2000 - 5000 Reputation Level)icywave User rank is Sergeant Major (2000 - 5000 Reputation Level)icywave User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 4 Days 22 h 23 m 30 sec
Reputation Power: 31