Wrox Programmer Forums
|
ASP CDO As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP CDO section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 16th, 2004, 12:55 AM
Registered User
 
Join Date: Mar 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default CDOSYS mail help or CDO help


I have a problem it seems that when I try to send a file in the html format it doesnot send the saved html files i have saved based on the response. For instance I have four different html emails to choose from based on the customers request. Originaly I had no problems using this code in the CDONTS format where I could tell it what type of mail it was based on the body format.By the way I'm loking for independant web developers that Know asp.net or asp to develope and maintain web sites.
Email me at [email protected]






<%
function sendemail(cEmail,cName,cSubject,cBody,cBCC,lHTML)
On Error Resume Next

if gEmailComponent="CDO" then
Dim objCDO
Dim iConf
Dim Flds

'Const cdoSendUsingPort = 2

Set objCDO = Server.CreateObject("CDO.Message")
Set iConf = Server.CreateObject("CDO.Configuration")
'cdoSendUsingPort
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail-fwd"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 40
.Update
End With

Set objCDO.Configuration = iConf

objCDO.To = cEmail
objCDO.BCC = cBCC
'objCDO.Value("Reply-To") = gCompanyEmail
objCDO.From = gCompanyEmail
objCDO.Subject = cSubject
'objCDO.importance = 1

'Set body format for lHTML
if lHTML then
objCDO.HTMLBody = cBody
else
objCDO.TextBody = cBody
end if
objCDO.Send
'set objCDO = closed
'Set iConf = closed
'Set Flds = closed
'Response.redirect "confirmation.html"
' Any existing page can be used for the response redirect method
'END IF

set objCDO = nothing
Set iConf = Nothing
Set Flds = Nothing
end if
Error=Err.description

sendemail=Err=0

end Function

%>



Your help is greatly apprciated...........






Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending Mail Using CDOSYS in ASP artarasan Classic ASP Basics 1 May 12th, 2008 06:11 PM
CDOSYS Mail component error shrisangeeta Classic ASP Basics 1 May 5th, 2007 06:01 AM
Problems with CDO.Message (CDOSYS) roynaveen Classic ASP Professional 1 March 14th, 2007 07:56 AM
mail through cdosys.dl Amit singla ASP.NET 1.0 and 1.1 Professional 3 October 26th, 2006 06:41 AM
How do you use CDOSYS mail SoC Classic ASP Basics 5 April 20th, 2005 10:56 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.