Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 232
  • Last Modified:

Sending mail from an asp page (VBScript)

Can someone give me a script (VBScript) to sendmail
from an asp page?  thanks!
0
denam
Asked:
denam
  • 4
  • 2
1 Solution
 
changgCommented:
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
 
MasseyMCommented:
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
 
denamAuthor Commented:
Massey, JMail looks like a pretty good product, but there's almost no documentation
with it.  

Dena
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
denamAuthor Commented:
I found the documentation for JMail...it does look like the right solution for me.
Thanks.  

Dena
0
 
denamAuthor Commented:
Thanks both of you.
0
 
MasseyMCommented:
JMail also has some of the best support.  I emailed them with my source and we had it fixed within the hour.
0
 
denamAuthor Commented:
Massey, you've saved a newbie once again.  thx.

Dena
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now