Help! CDO

E

elica

I was using this code and was fine but not anymore.

<%
Function SendEmail( sEmailServer, sFromEmail, sToEmail, sSubject, sText )
Dim objMessage
Set objMessage = Server.CreateObject("CDO.Message")
objMessage.From = sFromEmail
objMessage.To = sToEmail
objMessage.Bcc = "(e-mail address removed)"
objMessage.Subject = sSubject
objMessage.TextBody = sText
objMessage.Send
Set objMessage = Nothing
End Function
%>

This seams to work on my server but how to insert the rest?
Thanks for any HELP!


<%
Dim objMessage
Dim myMail
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From= "sFromEmail"
myMail.To="(e-mail address removed)"
myMail.TextBody="This is a message."
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

'Name or IP of remote SMTP server
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "127.0.0.1"

'Server port
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
myMail.Configuration.Fields.Update
myMail.Send
set myMail=nothing
%>


fab
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top