Solved

Sending mail from an asp page (VBScript)

Posted on 1999-01-28
7
225 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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.

823 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