Solved

Sending mail from an asp page (VBScript)

Posted on 1999-01-28
7
219 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Accessibility and Usability are two concepts that seem to be closely related.  But, too many people seem to have a distorted perception of them. During last five years, those two words have come to the day-to-day work of almost every web develope…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

743 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

12 Experts available now in Live!

Get 1:1 Help Now