Hi,
I've got following VBscript that I would like to alter to java script:
This automatically sends an email without prompting the user.
Can this be done with Java script?? if so how?
VBscript:
============================================================
Set m_objCDO = CreateObject("CDO.Message")
Set m_objCDOcon = CreateObject("CDO.Configuration")
Const cdoSendUsingMethod = "Const cdoSendUsingPort = 2
Const cdoSMTPServer = "Const cdoSMTPServerPort ="Const cdoSMTPConnectionTimeout = "Const cdoSMTPAuthenticate = "Const cdoBasic = 1
Const cdoSendUserName = "Const cdoSendPassword = "
meldung = "Dear Sir, <br> your message"
'Sending email notification
Set Fields = m_objCDOcon.Fields
'Setting up Message parameters
With Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
'Replace with your SMTP server
.Item(cdoSMTPServer) = "server"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPConnectionTimeout) = 100
'Only used if SMTP server requires Authentication
'.Item(cdoSMTPAuthenticate) = cdoBasic
'.Item(cdoSendUserName) = "yourusername"
'.Item(cdoSendPassword) = "yourpassword"
.Update
End with
'Passing parameters to message object
Set m_objCDO.Configuration = m_objCDOcon
With m_objCDO
'Replace with email you wish the message to be sent to
.To = "somemail@mail.com"
'Replace with email you wish the message to be from
.From = "mail@microsoft.com"
' Attachment using known static physical path
'.AddAttachment "c:\Multiping.xls"
'.AddAttachment Server.MapPath("images/asp101-100x30.gif")
' Attachment added directly from a URL
'.AddAttachment " file.htm"
'Replace with subject
.Subject = "Test subject"
'Replace with information you want to be sent
.HTMLBody = meldung
.Send
End With
==================================================
Thanks!!
I've got following VBscript that I would like to alter to java script:
This automatically sends an email without prompting the user.
Can this be done with Java script?? if so how?
VBscript:
============================================================
Set m_objCDO = CreateObject("CDO.Message")
Set m_objCDOcon = CreateObject("CDO.Configuration")
Const cdoSendUsingMethod = "Const cdoSendUsingPort = 2
Const cdoSMTPServer = "Const cdoSMTPServerPort ="Const cdoSMTPConnectionTimeout = "Const cdoSMTPAuthenticate = "Const cdoBasic = 1
Const cdoSendUserName = "Const cdoSendPassword = "
meldung = "Dear Sir, <br> your message"
'Sending email notification
Set Fields = m_objCDOcon.Fields
'Setting up Message parameters
With Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
'Replace with your SMTP server
.Item(cdoSMTPServer) = "server"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPConnectionTimeout) = 100
'Only used if SMTP server requires Authentication
'.Item(cdoSMTPAuthenticate) = cdoBasic
'.Item(cdoSendUserName) = "yourusername"
'.Item(cdoSendPassword) = "yourpassword"
.Update
End with
'Passing parameters to message object
Set m_objCDO.Configuration = m_objCDOcon
With m_objCDO
'Replace with email you wish the message to be sent to
.To = "somemail@mail.com"
'Replace with email you wish the message to be from
.From = "mail@microsoft.com"
' Attachment using known static physical path
'.AddAttachment "c:\Multiping.xls"
'.AddAttachment Server.MapPath("images/asp101-100x30.gif")
' Attachment added directly from a URL
'.AddAttachment " file.htm"
'Replace with subject
.Subject = "Test subject"
'Replace with information you want to be sent
.HTMLBody = meldung
.Send
End With
==================================================
Thanks!!