|
I don't remember exactly how to do it, but I think it involves replacing Carriage Return\Newline pairs with "<br>" tags.
Try this before assigning the body text to the CDONTS object:
...
bodytext = Replace(bodytext, vbCrLf, vbCr)
bodytext = Replace(bodytext, vbLf, vbCr)
bodytext = Replace(bodytext, vbCr, "<br>")
...
I think this will only work for HTML emails. I haven't tested it.
Jon Sagara
Hi! I'm Melanoma, Moley Russell's wart.
-- Uncle Buck
|
|
|
|
|
Hi Jon,
I solved this problem after a bit of trial and error by removing this line:
oMail.MailFormat = CdoMailFormatMime
Kevin
|
|
|
|
|
Hi.
I think I might be able to help...I mean, Im no DEVGURU, but between some Libraries I have, the internet and a couple of books I have around the house, Im sure I can help out.
heres my resume:
http://www.radiostatic.net/jon/index.html
I also work with Flash, Photoshop, Ilustrator, Swift 3d & Openwave SDK (wap)
Let me know if I can be of any help and what forms of payment you work with (Im ok with the per-job pay).
Talk soon,
Jon
GET TO KNOW ME
|
|
|
|
|
Hello,
I tried to look at your resume site and the flash won't load. I have flash MX installed, and am using IE5.5. Is something wrong with the file perhaps?
Nathan
NATHAN RIDLEY
Web Application Developer
generalgherkin@yahoo.com
|
|
|
|
|
trying to send an email using CDONTS on entry to a page, by using the Window_Onload() Sub routine...
The page is initiated by another page with a form "submit" button... I get the following error when the page attempts to open:
Cannot run the FrontPage Server Extensions' Smart HTML interpreter on this non-HTML page: "http://stage/email_con.html"
Basically, all this page does is thank the user for contacting me and allows them to click a "close window" button, which does a window.close()
Here's the code for the sub:
<%
Sub Window_OnLoad()
Dim objMail
Set objMail = CreateObject("CDONTS.Newmail")
objMail.TO = "vlusardi@sdcera.org"
objmail.Subject = "HTML EMAIL!"
objMail.MailFormat = cdoMailFormatMime
objMail.BodyFormat = cdoBodyFormatHTML
objMail.Body = "this is a test"
objMail.send
set objMail = Nothing
alert("mail sent")
End Sub
%>
can someone tell me how to correct the error message?..... thanks very much...
|
|
|
|
|
Is this code in email_con.html? Is your server configured to run ASP code from files with *.html extensions?
Jon Sagara
Hi! I'm Melanoma, Moley Russell's wart.
-- Uncle Buck
|
|
|
|
|
jon,
thanks for the reply... not sure if it's configured for that or not, but it runs javascript just fine so I'm assuming it will run vbscript as well... is this an incorrect assumption...??? so to answer you question, yes, it's in the email_con.html file... thanks for any input
|
|
|
|
|
Normally .html files are static with regards to server-side processing. You are right, JavaScript does execute in .html files, but it executes on the client side (unless you explicitly specify for it to run on the server). VBScript will run on the client side, but only in Internet Explorer. For ASP processing, you want the script to execute on the server side.
Try renaming the file to email_con.asp and run it again. This tells the Web server that your file potentially contains ASP code that it needs to execute.
This page[^] will give you an introduction to ASP programming. I haven't read any of the material, but it should clarify server-side vs. client-side if you have any further questions. Or ask me, and I'll try to answer them.
Jon Sagara
Hi! I'm Melanoma, Moley Russell's wart.
-- Uncle Buck
|
|
|
|
|
jon,
thanks again for the reply... I renamed the file to a .asp extension and got the exact same error message... could there be a server configuration issue, or is there something I'm missing in my code....???
thanks again...
|
|
|
|
|
I've tried both methods, <% and , and it produces the same error message...
Cannot run the FrontPage Server Extensions' Smart HTML interpreter on this non-HTML page: "http://stage/email_con.asp"
thanks for any help
|
|
|
|
|
Nope, I'm stumped. I never use the FrontPage extensions. Anyone else use them?
It does sound like a configuration issue, but I don't know what it could be.
Jon Sagara
Hi! I'm Melanoma, Moley Russell's wart.
-- Uncle Buck
|
|
|
|
|
Found this: http://support.microsoft.com/default.aspx?scid=KB;en-us;q205540[^]
Are you using FrontPage to develop ASP pages? If so, I suggest abandoning it for a plain-text code editor. The learning curve is much steeper, but the end results will be worth it.
Jon Sagara
Hi! I'm Melanoma, Moley Russell's wart.
-- Uncle Buck
|
|
|
|
|
I am doing a very very important college project and pulling my hair out!!
I have a table showing certain features which i need to constantly update- ie no of times the feature on the page has been viewed, time elapsed since uplaoding it etc
Can anyone suggest how to do this- using what language(ASP &javascript/vbscript??)
what classes do i need to include-a time/date one??
PLEASE HELP!!!
Maria..........
|
|
|
|
|
Maria,
if you want to refresh only a single portion of a page in a clean manner, then use the XMLDOM.
If you need samples, etc... then I could help with that.
Cheers,
Simon
"The day I swan around in expensive suits is the day I hope someone puts a bullet in my head.", Chris Carter.
my svg article
|
|
|
|
|
I think having that section of the code in IFRAME tag and loading as a separate page would facilitate partial reloading. However the catch is IFRAME is supported only on MSIE.
deepak
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
In many of the programming books I read there is always a strong focus on 3-tier design. The problem is, I have never been able to find a resource which teaches the basics of 3-tier design. I am getting a grasp of the big picture of 3-tier design from the context of the books I read, but because I have not been able to build a reliable basic foundation, it is hard to be sure of what I am doing. Does anyone have any suggestions for some beginner web tutorials or books on the theory AND implementation of 3-tier applications? Thanks.
Mark Sanders
Tulsa, OK
|
|
|
|
|
try www.asp.net and look at the ibspyportal or ibspystore app. They have a 3 tier architecture and you can download the code to review. Also take a look at the architectural (sp) section of the forums as there are quiet a few discussions on this very topic. Hope its helpful.
|
|
|
|
|
I tried & worked OK with the ASPMail.
And its the time for cdonts now. As I need it quickly, I am posting this message here and asking for help. At same time, I will search around the web for the same. Any one can help around with this please.
Thanks
I was born intelligent Education ruined me!.
|
|
|
|
|
First - make sure you have SMTP installed on your IIS server (should be there, but if it isn't, this could cause you hours of insane frustration if nobody warns you ).
Dim objMail,sMailBody, strBody, email, name 'Dim necessary vars
Set objMail = Server.CreateObject("CDONTS.NewMail") 'create object
email = "you@whoever.com"
name = "A Name"
objMail.From = "me@whoever.com" 'set the from for the email
objMail.Subject = "CDONTS Email" 'set the subject for the email
objMail.To = email
'Build the body in HTML format
strBody = "" & _
"" & _
"" & _
" Hello name " & _
" I am writing to you bla bla bla." & _
" " & _
"" & _
""
objMail.Body = strBody
'set the format before the send
objMail.MailFormat = 0
objMail.BodyFormat = 0
'send the mail
objMail.Send
Set objMail = nothing 'destroy the object again
Hope that helps. Note- the HTML formatting for the body of the email is not necessary, but it is a nice touch.
A pack of geeks, pale and skinny, feeling a bit pumped and macho after a morning of strenuous mouse clicking and dragging, arriving en masse at the gym. They carefully reset the machines to the lowest settings, offer to spot for each other on the 5 lb dumbells, and rediscover the art of macrame while attempting to jump rope. -Roger Wright on my colleagues and I going to gym each day at lunch
|
|
|
|
|
Megan Forbes wrote:
make sure you have SMTP installed on your IIS server
My IIS doc says... CDONTS supported. So, SMTP should b there right??
Megan Forbes wrote:
Hope that helps
Will give a try and check it out.
Thanks
I was born intelligent Education ruined me!.
|
|
|
|
|
When IIS is open, do you see SMTP as a node?
A pack of geeks, pale and skinny, feeling a bit pumped and macho after a morning of strenuous mouse clicking and dragging, arriving en masse at the gym. They carefully reset the machines to the lowest settings, offer to spot for each other on the 5 lb dumbells, and rediscover the art of macrame while attempting to jump rope. -Roger Wright on my colleagues and I going to gym each day at lunch
|
|
|
|
|
Actually... my site is hosted by a 3rd party. And they say that CDONTS is supported (a part of the doc that was sent to me along with the registration).
So I tried for it.
Thanks!
I was born intelligent Education ruined me!.
|
|
|
|
|
|
Thanks....
I was born intelligent Education ruined me!.
|
|
|
|
|
Hi!
I tried to validate my web page at http://validator.w3.org[^] and got 497 (yes, four hundred ninety seven) errors! The page rendered fine in IE 5 and 6, but was obviously not valid XHTML. Well anyway, I nailed down all of them, but one.
Here is the code snippet:
<span class="someclass">
Some text.
<br />
<ul style="margin:0px 0px 0px 25px;">
<li>Item one</li>
<li>Item two</li>
</ul>
<br />
Some more text.
</span>
The error message I got from the validator was:
Line 504, column 46: document type does not allow
element "ul" here; missing one of "object", "applet",
"map", "iframe", "button", "ins", "del" start-tag
<ul style="margin:0px 0px 0px 25px;">
^
Hmmm...
So what should I do now to make it valid XHTML and still get what I want? I have tried enclosing the ul within span, p, div, even blockquote. div and p etc result in the error message that p or div cannot be present here. It's 1:45 am here and after working on this for straight I don't know how many hours fixing 496 errors, I can't think properly now. I am not an expert in this stuff. Please help.
Thanks in advance.
Regards,
Rohit Sinha
|
|
|
|