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:
  #1  
Old March 6th, 2005, 04:48 PM
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: 29,262 Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)  Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 2 Days 32 m 33 sec
Reputation Power: 2509
Post Sending Emails using CDO.Message component

Fully working sub routine to send given email body to given email address:
Code:
 <%
 Const SMTP_SERVER="smtpserver.domain.com"
 
 '--------------------------------------------------------------------
 'SendEmail:
 'Try to send given email using CDO component.
 'Returns empty string in case of success or error message in case of error.
 '--------------------------------------------------------------------
Function SendEmail(strEmailTo, strEmailFrom, strEmailSubject, strEmailBody, arrAttachments)
	'declare variables
	Dim objMessage	'object for sending email
	Dim objConf	'object for configuration of email settings
	Dim x		'loop iterator
	
	'define default return value:
	SendEmail=""
	
	'create objects:
	Set objMessage=Server.CreateObject("CDO.Message")
	Set objConf=Server.CreateObject("CDO.Configuration")
	
	'define settings:
	If Len(SMTP_SERVER)=0 Then
		objConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=1
	Else  
		objConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 'cdoSendUsingPort
	End If
	objConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory")=Server.MapPath("/")
	If Len(SMTP_SERVER)>0 Then
	    objConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")=SMTP_SERVER
	End If
	objConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
	objConf.Fields.Update
	
	'apply settings:
	Set objMessage.Configuration=objConf
	
	'build message details:
	objMessage.To=strEmailTo
	objMessage.From=strEmailFrom
	objMessage.Subject=strEmailSubject
	objMessage.HtmlBody=strEmailBody
	
	If IsArray(arrAttachments) Then
		For x=0 To UBound(arrAttachments)
			objMessage.AddAttachment arrAttachments(x)
		Next
	End If
	
	'catch errors and try to send:
	On Error Resume Next
		objMessage.Send
		If Err.Number<>0 Then
			SendEmail=Err.Description
			Err.Clear
		End If
	On Error Goto 0
	
	'done, clear objects from the memory:
 	Set objMessage=Nothing
 	Set objConf=Nothing
End Function

'usage:
Dim strError
strError = SendEmail("someone@somewhere.com", "test <test@test.com>", "testing without attachments", "hello world", "")
If Len(strError)=0 Then
	Response.Write("success!<br />")
Else  
	Response.Write("failure: " & strError & "<br />")
End If
strError = SendEmail("someone@somewhere.com", "test <test@test.com>", "testing with attachments", "hello world", Array(Server.MapPath("file1.txt"), Server.MapPath("file2.asp")))
If Len(strError)=0 Then
	Response.Write("success!")
Else  
	Response.Write("failure: " & strError & "<br />")
End If
 %>
 

-attached is the same code as text file.
Attached Files
File Type: txt SendMail.asp.txt (2.5 KB, 757 views)

Last edited by Shadow Wizard : April 8th, 2008 at 06:30 AM.

Reply With Quote
  #2  
Old April 14th, 2006, 03:34 AM
matrixtlm matrixtlm is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2006
Posts: 119 matrixtlm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 18 h 1 m 15 sec
Reputation Power: 5
Quote:
Originally Posted by Shadow Wizard
Fully working sub routine to send given email body to given email address:
Code:
 <%
 Const SMTP_SERVER="smtpserver.domain.com"
 
 '--------------------------------------------------------------------
 'SendEmail:
 'Try to send given email using CDO component.
 'Returns empty string in case of success or error message in case of error.
 '--------------------------------------------------------------------
 Function SendEmail(strEmailTo, strEmailFrom, strEmailSubject, strEmailBody)
 	'declare variables
 	Dim objMessage	'object for sending email
 	Dim objConf	'object for configuration of email settings
 	
 	'define default return value:
 	SendEmail=""
 	
 	'create objects:
 	Set objMessage=Server.CreateObject("CDO.Message")
 	Set objConf=Server.CreateObject("CDO.Configuration")
 	
 	'define settings:
 	If Len(SMTP_SERVER)=0 Then
 		objConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=1
 	Else  
 	    objConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 'cdoSendUsingPort
 	End If
     objConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory")=Server.MapPath("/")
 	If Len(SMTP_SERVER)>0 Then
 	    objConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")=SMTP_SERVER
 	End If
 	objConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
 	objConf.Fields.Update
 	
 	'apply settings:
 	Set objMessage.Configuration=objConf
 	
 	'build message details:
 	objMessage.To=strEmailTo
 	objMessage.From=strEmailFrom
 	objMessage.Subject=strEmailSubject
 	objMessage.HtmlBody=strEmailBody
 	
 	'catch errors and try to send:
 	On Error Resume Next
 		objMessage.Send
 		If Err.Number<>0 Then
 			SendEmail=Err.Description
 			Err.Clear
 		End If
 	On Error Goto 0
 	
 	'done, clear objects from the memory:
 	Set objMessage=Nothing
 	Set objConf=Nothing
 End Function
 %>
 

-attached is the same code as text file.


How bout adding attachment to it? How to edit the script to include attachment in the email as well ?

Reply With Quote
  #3  
Old April 16th, 2006, 08:34 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: 29,262 Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)  Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 2 Days 32 m 33 sec
Reputation Power: 2509
good point, the code has been changed to support attachments now. also, added
usage samples.

Reply With Quote
  #4  
Old December 22nd, 2007, 05:50 AM
solids solids is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Posts: 102 solids Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 1 h 41 sec
Reputation Power: 0
failure: The transport failed to connect to the server.
CDO.Message.1 error '80070002'

The system cannot find the file specified.

/ssp07/butt/email.asp, line 133







iam geting that errer message

Reply With Quote
  #5  
Old December 23rd, 2007, 03:01 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: 29,262 Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)  Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 2 Days 32 m 33 sec
Reputation Power: 2509
what is line 133?

Reply With Quote
  #6  
Old December 23rd, 2007, 05:38 AM
solids solids is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Posts: 102 solids Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 1 h 41 sec
Reputation Power: 0
Code:
	If IsArray(arrAttachments) Then
		For x=0 To UBound(arrAttachments)
			objMessage.AddAttachment arrAttachments(x)
		Next
	End If


the bold line is 133...

All i did was copy the hole code and put it in my asp page..do i need to make any changed to it?

Reply With Quote
  #7  
Old December 23rd, 2007, 09:40 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: 29,262 Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)  Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 2 Days 32 m 33 sec
Reputation Power: 2509
the files you tried to attach don't exist on your server.
for example if you have this exact code:
Code:
strError = SendEmail("someone@somewhere.com", "test <test@test.com>", "testing with attachments", "hello world", Array(Server.MapPath("file1.txt"), Server.MapPath("file2.asp")))

then you should have file named "file1.txt" and file named "file2.txt" on your server.

this was given as example only, sorry if it's not clear enough in the original post.

Reply With Quote
  #8  
Old December 23rd, 2007, 09:50 AM
solids solids is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Posts: 102 solids Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 1 h 41 sec
Reputation Power: 0
ok quck quston..
do i need a page b4 this page which the user enters there email address in and text area where they put there email in and when they hit send this asp page does the rest?

Reply With Quote
  #9  
Old December 23rd, 2007, 09:55 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: 29,262 Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)  Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 2 Days 32 m 33 sec
Reputation Power: 2509
yes usually web programmers use forms to let visitor type something then
they use this in their code.

Reply With Quote
  #10  
Old December 24th, 2007, 12:13 AM
Full Moon Full Moon is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2007
Posts: 57 Full Moon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 h 41 m 33 sec
Reputation Power: 3
hi, i used your code but without the attachment code, but i were wondering what should i put here
""test <test@test.com>"

Reply With Quote
  #11  
Old December 24th, 2007, 02:34 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: 12,685 micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)  Folding Points: 1480 Folding Title: Novice Folder
Time spent in forums: 5 Months 1 Week 5 Days 4 h 5 m 20 sec
Reputation Power: 2358
Quote:
Originally Posted by Full Moon
hi, i used your code but without the attachment code, but i were wondering what should i put here
""test <test@test.com>"
read the code for function SendEmail
its the email address of the sender of mail with the name(if u want)
__________________
Laziness is my religion and Sunday is my God

Get the Mantra!

Reply With Quote
  #12  
Old December 24th, 2007, 04:08 AM
Full Moon Full Moon is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2007
Posts: 57 Full Moon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 h 41 m 33 sec
Reputation Power: 3
thanks, but it now it giving me the following error:
failure: The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for "my email address"

Reply With Quote
  #13  
Old December 24th, 2007, 04:17 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: 12,685 micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)micky User rank is General 21st Grade (Above 100000 Reputation Level)  Folding Points: 1480 Folding Title: Novice Folder
Time spent in forums: 5 Months 1 Week 5 Days 4 h 5 m 20 sec
Reputation Power: 2358
Quote:
Originally Posted by Full Moon
thanks, but it now it giving me the following error:
failure: The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for "my email address"
it seems that the email address is not valid!

it will help if u post the line of the error

Reply With Quote
  #14  
Old December 24th, 2007, 04:18 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: 29,262 Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)  Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 2 Days 32 m 33 sec
Reputation Power: 2509
Quote:
Originally Posted by Full Moon
thanks, but it now it giving me the following error:
failure: The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for "my email address"
the message is in plain English, I think we can't be more clear than that.
contact your host and ask for SMTP server that allow sending emails to
external domains.

Reply With Quote
  #15  
Old February 11th, 2008, 09:23 PM
jenggot jenggot is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 1 jenggot User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 42 sec
Reputation Power: 0
response

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

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > Sending Emails using CDO.Message component


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek