new line in textbody of email.

I have the following code and its not putting a newline where I want it.  Any ideas?
strcounter = Wscript.Arguments(0)
' Define who the email is sent from, must be in valid format (can be bogus address)
emailFrom = ""
' Define who the email is sent To
email_arr = array("cmuench@casit.net","cmuench@gmail.com")
' Define the SMTP server to handle the email
SMTPserver = ""
' Define the SMTP server port to used
'*** Line 40
SMTPport = "27"
'Define the SMTP username to send
SMTPuser = ""
'Define the SMTP password for the above user
SMTPpasswd = ""
' Send the email out
' split string into array
' loop through array and call SendEmail sub
for Each email in email_arr
  SendEmail(email)
next
sub SendEmail(emailTo)
' Define the action
Set objEmail = CreateObject("CDO.Message")
' Who, What, Where, When, Why, How
objEmail.From = emailFrom
objEmail.To = emailTo
' Edit the subject and body as required...
objEmail.Subject = "Low Disk Space!!! on agrove."
objEmail.Textbody = "A low disk space error has occurred from the following counter. "&strcounter &"\r\nAt this time" & Now()
' Define email server settings
objEmail.Configuration.Fields.Item _ 
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _ 
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTPserver 
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = SMTPuser
'Your password on the SMTP server
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = SMTPpasswd
'Server port (typically 25)
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = SMTPport
'Use SSL for the connection (False or True)
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
objEmail.Configuration.Fields.Update
' Send the EMAIL
objEmail.Send
End Sub
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
' Stop the script in case it doesn't automatically
WScript.Quit

Open in new window

casitAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lee SavidgeCommented:
Hi,

Change the line to:

objEmail.Textbody = "A low disk space error has occurred from the following counter. "&strcounter & vbCrLf & "At this time" & Now()

Regards,

Lee
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
casitAuthor Commented:
Thanks.  Guess I need some coffee
0
Lee SavidgeCommented:
It's Friday. Beer time :)

Regards,

Lee
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.