Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sending email using CDONTS

Status
Not open for further replies.

edifreak

IS-IT--Management
Apr 7, 2003
74
AU
Hello all,

I'm trying to send a email out once a user completes the register section. I just want to know if the objMail.From = "yo@yo.com"
can be replaced by text instead of email address? so the actual from says a person name instead of the email. I tried declaraing a variable and assigned it a string and it still dont like it..

dim strfrom

strfrom = "From me"

objMail.From = strfrom

help me? TIA
 
There is another component that is newer then CDONTS that does not use SMTP and that speeds up the email..

<%

'Dimension variables
Dim objCDOSYSCon, objCDOSYSMail

'Create the e-mail server object
Set objCDOSYSMail = CreateObject("CDO.Message")
Set objCDOSYSCon = CreateObject("CDO.Configuration")

' 'Internal relay server
'
objCDOSYSCon.Fields(" = "xxx.xxx.x.xx6"
'
objCDOSYSCon.Fields(" = 25
'
objCDOSYSCon.Fields(" = 2
'
objCDOSYSCon.Fields(" = 60
' 'For Windows Authenication
'
objCDOSYSCon.Fields(" = "2"

'External tvicorp.com relay server

objCDOSYSCon.Fields(" = "xx.xx.xx.xxx"

objCDOSYSCon.Fields(" = 25

objCDOSYSCon.Fields(" = 2

objCDOSYSCon.Fields(" = 60

objCDOSYSCon.Fields(" = "1" 'basic authentication

'objCDOSYSCon.Fields(" = "yourname@xxx.com" 'set your username here

'objCDOSYSCon.Fields(" = "xxxxx" 'set your password here

objCDOSYSCon.Fields.Update

'Update the CDOSYS Configuration
Set objCDOSYSMail.Configuration = objCDOSYSCon

objCDOSYSMail.From = "xxx@xxx.com"
objCDOSYSMail.To = "xxx@xxxx.com"
objCDOSYSMail.Subject = "test email"
objCDOSYSMail.HTMLBody = "this is the body"
objCDOSYSMail.Send

'Close the server mail object
Set objCDOSYSMail = Nothing
Set objCDOSYSCon = Nothing


'End Function

%>
 
ty ChrisHirst. will try that.

also, thanks TRACEYMARYLAND for that script. Will look in to that aswell.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top