Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Mar 2007
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation ASP/JavaScript CDO Message

    Hi,

    I am currently having difficluty with creating an ASP CDO Message Code that uses JavaScript as its server-side language. I know the VBScript one, but I cannot use that.

    The VBScript one is:

    <%
    Set myMail=CreateObject("CDO.Message")
    myMail.Subject="Sending email with CDO"
    myMail.From="mymail@mydomain.com"
    myMail.To="someone@somedomain.com"
    myMail.TextBody="This is a message."
    myMail.Send
    set myMail=nothing
    %>


    I know that the ASP/JavaScript code must start with:

    <%@ language="JavaScript"%>

    --
    Gunu

  • #2
    Regular Coder
    Join Date
    Apr 2006
    Posts
    133
    Thanks
    6
    Thanked 0 Times in 0 Posts
    I don't understand why you need the javascript. ASP pages accepts the VB language and you can use the same codes. Please ask it with more details. Maybe I can help.
    Thanks

  • #3
    New Coder
    Join Date
    Mar 2007
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Either the whole page is written in VBScript, or the whole page is written in JavaScript. I have other codes on the same page, in JavaScript. So I'll either have to change all of that into VBScript and have no trouble with the mail code; or i'll have to keep all of it in JavaScript and modify the Mail Code.

  • #4
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Actually, I believe with ASP you can mix JavaScript and VBScript on the same page. I'm not saying its a good coding practice but it is possible.
    OracleGuy

  • #5
    SSJ
    SSJ is offline
    Regular Coder
    Join Date
    Mar 2007
    Posts
    230
    Thanks
    0
    Thanked 4 Times in 4 Posts
    Just modify the mail code

  • #6
    New Coder
    Join Date
    Mar 2007
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have tried to change the code...

    I don't know what to do though.
    I think the problem is in the SET thing
    GuNuaG
    I know ASP, HTML, JavaScript, CSS, and little bit of Flash and PHP!

  • #7
    SSJ
    SSJ is offline
    Regular Coder
    Join Date
    Mar 2007
    Posts
    230
    Thanks
    0
    Thanked 4 Times in 4 Posts
    post your whole page code

  • #8
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,072
    Thanks
    4
    Thanked 8 Times in 8 Posts
    To send with Javascript as the server side language
    <%
    myMail= new ActiveXObject("CDO.Message")
    myMail.Subject="Sending email with CDO"
    myMail.From="mymail@mydomain.com"
    myMail.To="someone@somedomain.com"
    myMail.TextBody="This is a message."
    myMail.Send
    %>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •