vb to jscript help immdt

Results 1 to 2 of 2

Thread: vb to jscript help immdt

  1. #1
    guna Guest

    Default vb to jscript help immdt

    Hi thanx to anyone who can help<BR><BR>I use an aspemail object and the script is running fine in vbscript but while running in jscript i get the error msg<BR><BR>object doesnt support this property <BR>for the AddAddress and Send properties<BR><BR>here is the code<BR><BR>vb<BR><BR>Set Mail = Server.CreateObject("Persits.MailSender")<BR> &#039 enter valid SMTP host<BR> Mail.Host = strHost<BR><BR> Mail.From = Request("From") &#039 From address<BR> Mail.FromName = Request("FromName") &#039 optional<BR> Mail.AddAddress Request("To")<BR> <BR> &#039 message subject<BR> Mail.Subject = Request("Subject")<BR> &#039 message body<BR> Mail.Body = Request("Body")<BR><BR> strErr = ""<BR> bSuccess = False<BR> On Error Resume Next &#039 catch errors<BR> Mail.Send &#039 send message<BR><BR>Jscript<BR><BR>Mail = Server.CreateObject("Persits.MailSender");<BR> <BR> <BR> Mail.Host = "mail.emirates.net.ae";<BR><BR> Mail.From = Name;<BR> <BR> Mail.Address+Request("Email")<BR> <BR> <BR> Mail.Subject ="test message";<BR> <BR> Mail.Body = "test"<BR> Mail.Send;<BR><BR>Ive Tried all alternates<BR>Plse help immdt<BR>Guna<BR>

  2. #2
    JoeMc Guest

    Default RE: vb to jscript help immdt

    The only things I can think of might be:<BR>1)Mail.Address+Request("Email") You put + instead of =<BR><BR>2)You might need () after Mail.send.<BR><BR>Javascript functions expect ().<BR>FYI. Javascript is case sensitive. <BR><BR>Here is code I have written<BR>var objNewMail = Server.CreateObject("CDONTS.NewMail");<BR>objNewMa il.From = "sample@ddd.com";<BR>objNewMail.To = "service@myDomain.com";<BR>objNewMail.Subject = "Control Message";<BR>objNewMail.Body = "mailBodyString"; <BR>objNewMail.Send(); <BR>Good luck Let me know if this helped.<BR>Joe <BR>

Posting Permissions

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