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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vbcrlf not working with cdosys 4

Status
Not open for further replies.

ralphonzo

Programmer
Apr 9, 2003
228
GB
hi, does anyone have any idea why vbcrlf isn't working with my cdosys scripts? it worked just fine with cdonts!
 
Thanks for the pointer, but that doesn't work for me either!!
 
Perhaps you should post your code and explain "doesn't work" further.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
OK,

Code:
Set oCdoMail = Server.CreateObject("CDO.Message")
			Set oCdoConf = Server.CreateObject("CDO.Configuration")
			sConfURL = "[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/"[/URL]
			
			msg = "Dear Print Points Plus Redeemer," 
			msg=msg &"%0AYou have a new Client: "&request.form("ruser1")&" "&request.form("ruser2")
			msg=msg &"%0A%0APPP%0AJoin the Revolution"
	
			with oCdoConf
				.Fields.Item(sConfURL & "sendusing") = 2
				.Fields.Item(sConfURL & "smtpserver") = "localhost"
				.Fields.Item(sConfURL & "smtpserverport") = 25
				.Fields.Update
			end with
	
			with oCdoMail
				.From = "auto@ppp.co.uk"
				.To = "register@ppp.co.uk"
				.Subject = "New Client"
				.TextBody = msg
				.HTMLBody = msg
				.Configuration = oCdoConf
				.Send
			end with
	
			Set oCdoConf = Nothing
			Set oCdoMail = Nothing
hope someone can make some sense out of this. The cdo script works fine, it's just the line breaks.
 
I don't do a lot of CDO work, but if you set .HTMLBody = msg, then I would think that you would need to use <br> for line breaks.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
What about using vbCrLf and not use HTMLBody ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hi PHV:

Your Are Just Fantastic!!

Me you tell to use %0A , ralphonzo you tell to use VBCRLF.

I would give you ten stars if I was able to!!


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top