[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

10/09/2007 at 03:23AM PDT, ID: 22880892
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

Send SMTP email from IIS (asp?)

Asked by hedrickb in Microsoft IIS Web Server, VB Script, Active Server Pages (ASP)

Tags: email, smtp, send, vbscript

Trying to change existing functionality of a webbased app.  Current app sends e-mail via client-side outlook called from VBScript.  Want to change to server-side sending of mail.

Current:  When send mail button is pressed, here's what happens:

A javascript (.js) file calls a vbscript file with the command: execScript("WriteTicketEmailTo()","VBScript");

Below is the current VBscript file.  Would like to replace the VBscript (or add to the Javascript) to utilize server-side SMTP sending.  Have downloaded several ActiveX controls.  The Javascript and VBScript samples all work fine when I run them stand-alone on the server.   When I add the code to the IIS pages, I get automation errors in my client.  I assume I need to be using ASP to get things to run server-side, not sure how to call.  What/how do I change the execScript command to call the following code vs. the current? - or how do I cut in javascript to get things to run server-side.

Thanks for any advice

<WANTED xxx.asp file>
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>

<P>

<%

Dim objSmtpMail
Set objSmtpMail = Server.CreateObject("AddEmail.SmtpMail")


Dim strResult, numResultCode
numResultCode = objSmtpMail.SimpleSendScriptable("w","x","y","z")
If numResultCode = 0 Then
    Response.Write "Sent successfully!"
Else
    Response.Write "Error " & numResultCode
    Response.Write "<BR>" & strResult
End If

%>

</P>

</BODY>
</HTML>


<CURRENT XXX.vbs file contents>1
Sub WriteTicketEmailTo()
      dim c, i
      Dim vTO, vCC, vBCC, vBody, vSubject
      Dim vForm

      on error resume next

      Set objOutlook = GetObject(,"Outlook.Application")

      If error.num <> 0 Then
            Set objOutlook = CreateObject("Outlook.Application")
            error.clear
      End If

      Set NS = objOutlook.GetNamespace("MAPI")
      NS.Logon

      Set objOutlookMsg = objOutlook.CreateItem(0)
      vTo = document.ticketemail.toLine.value
      vCC = document.ticketemail.toCCLine.value
      vBody = document.ticketemail.toBody.value
      vSubject = document.ticketemail.toSubject.value

      objOutlookMsg.To   = vTo
      objOutlookMsg.CC   = vCC
      objOutlookMsg.Body = vBody
      objOutlookMsg.Subject = vSubject

      objOutlookMsg.Save
      objOutlookMsg.Display(true)

      Set ObjOutlook = Nothing
      Set ObjOutlookMsg = Nothing
End Sub
[+][-]10/09/07 03:50 AM, ID: 20039742

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft IIS Web Server, VB Script, Active Server Pages (ASP)
Tags: email, smtp, send, vbscript
Sign Up Now!
Solution Provided By: Madhusudanbanik
Participating Experts: 2
Solution Grade: A
 
 
[+][-]10/09/07 05:22 AM, ID: 20040233

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/09/07 08:22 AM, ID: 20041711

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/09/07 08:24 AM, ID: 20041729

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09/12/08 03:26 AM, ID: 22458363

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]09/17/08 06:36 PM, ID: 22506055

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20090824-EE-VQP-74 / EE_QW_2_20070628