ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 5th, 2003, 04:15 AM
McKenna's Avatar
McKenna McKenna is offline
Purple is a Fruit
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Ireland
Posts: 404 McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)  Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Days 2 h 27 m 38 sec
Reputation Power: 169
Simple (Hopefully!) CDONTS Question

Hey,

I have a script sending mail with asp using CDONTS. The script works fine, the only problem I have is specifying a new line in the message body. I am used to php's imap commands where you can just set the body to be "Hi\nThis is on a new line!" but putting \n in the text of the CDONTS mail just displays the \n as part of the text. Any ideas on how to set a new line in the text?

Thanks for reading

Reply With Quote
  #2  
Old February 5th, 2003, 09:00 AM
squib squib is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 23 squib User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 12 sec
Reputation Power: 0
Have you tried using the HTML <br> tag?

Reply With Quote
  #3  
Old February 5th, 2003, 09:10 AM
McKenna's Avatar
McKenna McKenna is offline
Purple is a Fruit
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Ireland
Posts: 404 McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)  Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Days 2 h 27 m 38 sec
Reputation Power: 169
Hey,

No, I don't want to send the mail as a html mail. Just as a plain text mail. I presume the newline character for text is \n, I'm just not sure how to implement it using CDONTS...

Thanks

Reply With Quote
  #4  
Old February 5th, 2003, 03:30 PM
cdarling cdarling is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 29 cdarling User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I think the problem is that php doesn't interpret what's between quotes. In VBScript, the solution is:

"Hi" & vbNewLine & "This is on a new line."

vbNewLine is a pre-defined character string that contains a hard return and a linefeed -- chr(13) & chr(10)

I think you need to do the same thing in php -- glue together two strings, with a third string made up of a hard return and a linefeed between the two.

Sorry, I don't speak php. But hopefully you can translate from the VBS example above.

Charlie
Comments on this post
Gran Roguismo agrees!

Reply With Quote
  #5  
Old February 6th, 2003, 04:01 AM
McKenna's Avatar
McKenna McKenna is offline
Purple is a Fruit
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Ireland
Posts: 404 McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)  Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Days 2 h 27 m 38 sec
Reputation Power: 169
Hey,

Thanks that worked a treat. Oddly in PHP, it's enough to just place the \n character within the quotes and it will create a newline.

Thanks again

Reply With Quote
  #6  
Old February 6th, 2003, 05:36 AM
a.koepke's Avatar
a.koepke a.koepke is offline
Second highest poster :p
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Jul 2001
Posts: 7,322 a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 8 h 13 m 55 sec
Reputation Power: 31
Welcome to the differences in Structured and Unstructured Programming. VB is unstructured code. PHP, Java, C is structured.

What does this mean? In structured languages you have ; at the end of lines, if statements use () to hold the condition, \n \t \r etc is available, using {} to denote code areas, the list goes on

On unstructured languages you dont have anything to denote end of lines, if statements have if condition then do this which is more like english and less like programming. Also things like all the special characters are not available. You use things like endif and wend to close code areas.

This is just a breif outline of the differences.
__________________
- Andreas Koepke

Koepke Photography


Reply With Quote
  #7  
Old February 24th, 2003, 08:44 AM
hortonr hortonr is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: London
Posts: 1 hortonr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Angry

oh please!

what you are harping on about there are differences in syntax.
these have nothing whatsoever to do with structure.

vb is as structured as those other languages you mention, regardless of whether or not you can get you head around the syntactical differences.

Reply With Quote
  #8  
Old February 24th, 2003, 09:10 AM
a.koepke's Avatar
a.koepke a.koepke is offline
Second highest poster :p
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Jul 2001
Posts: 7,322 a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 8 h 13 m 55 sec
Reputation Power: 31
Have you any formal programming training? Structured & Unstructured are simple programming concepts and are general categories.

BASIC code uses stuff like "if condition then this else that" and "goto overthere" meaining its unstructured. VB is based on BASIC. It has been called that since the languages were developed. Things like C were always known as structured since they had functions and code looked like "if (condition) { this; } else { that; }".

VB has functions and some of the things that structured programming has but its still refered to as an unstructured language. Take a step back in history and read this http://www.chisp.net/~dminer/c64/ga...01/8801088.html
It may be old but it shows what i mean.

Last edited by a.koepke : February 24th, 2003 at 09:15 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Simple (Hopefully!) CDONTS Question

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap