Solved

Sending mail from an asp page (VBScript)

Posted on 1999-01-28
7
221 Views
Last Modified: 2013-12-25
Can someone give me a script (VBScript) to sendmail
from an asp page?  thanks!
0
Comment
Question by:denam
  • 4
  • 2
7 Comments
 

Expert Comment

by:changg
ID: 1859292
Hi,

You can use the Collaboration Data Objects that comes with IIS 4 to send mail.

Here is an example function that I use, However you will need to install and configure the SMTP service for IIS4.


Sub CDOSendMail(strMessageFrom, strMessageTo, strMessageSubject, strMessageBody)
      Dim cdoMail

      Set cdoMail= Server.CreateObject("CDONTS.NewMAIL")
      
      cdoMail.Send strMessageFrom, strMessageTo, strMessageSubject, strMessageBody
        
      If Not cdoMail Is Nothing Then
      Set cdoMail = Nothing
      End If
End Sub

There are also many third party components that you can use from asp. One such component I use is AspMail. You can find it at www.serverobjects.com

Hope this helps,

Garett
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1859293
I use JMail whenever I can.  It comes from www.dimac.net   It is the BEST overall emailer I have found to date.  Far surpasses ASPMail, and best of all, it is free :) Yeah!

CDO NTS will not work unless you have both the SMTP service and IIS installed on the same machine and most ISP's do not have them setup that way.
0
 
LVL 1

Author Comment

by:denam
ID: 1859294
Massey, JMail looks like a pretty good product, but there's almost no documentation
with it.  

Dena
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 1

Author Comment

by:denam
ID: 1859295
I found the documentation for JMail...it does look like the right solution for me.
Thanks.  

Dena
0
 
LVL 1

Author Comment

by:denam
ID: 1859296
Thanks both of you.
0
 
LVL 10

Accepted Solution

by:
MasseyM earned 50 total points
ID: 1859297
JMail also has some of the best support.  I emailed them with my source and we had it fixed within the hour.
0
 
LVL 1

Author Comment

by:denam
ID: 1859298
Massey, you've saved a newbie once again.  thx.

Dena
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Drop down button NAMES disappear 1 62
.php tree directory? 5 57
compact pure CSS Read More Toggle 4 24
Grunt Copy file to another destination. 1 17
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now