Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 234
  • 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
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

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