Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

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

SMTP Email from ASP page

I need to send an email from an INTRANET asp page. Using Lotus notes domino server which my web page has access to to. How do I send the email from my web page pointing through to my smtp server. I've never sent an email from a page so this is new thing for me.

I have however used MS Access using cdonts and this worked however under the asp code it doesn't seem to be working. Maybe I'm missing a setup step in IIS. If so where do I setup, to point to the lotus notes server?

Any help would be appreciated.
0
MRXL
Asked:
MRXL
  • 3
1 Solution
 
MoOTottleCommented:
<%
    Dim MyCDONTSMail
    Dim sBody, SText, sFrom, sTo, sSubject, sText1
     
    sFrom = "support@domain.com"
    sTo = "user@domain.com"
    sSubject = "Message From Intranet"
    sBody "This is the body text of the email"


    Set MyCDONTSMail = CreateObject("CDONTS.NewMail")
    MyCDONTSMail.From= sFrom
    MyCDONTSMail.To=sTo
    MyCDONTSMail.Subject=sSubject
    MyCDONTSMail.BodyFormat=0
    MyCDONTSMail.MailFormat=0
    MyCDONTSMail.Body=sBody
    MyCDONTSMail.Send
    set MyCDONTSMail=nothing
%>
0
 
MoOTottleCommented:
Mrxl, the above code will work for the CDONTS object as long as you have the virtual SMTP server started within IIS

Below is an article abotu setting up the IIS virtual server: -

http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/windowsserver2003/proddocs/server/qss_mail_setup.asp

And this link has some good tips about configuring the security: -

http://www.iis-resources.com/modules/news/article.php?storyid=5

Let me know if that helps :)
0
 
Frog357Commented:
If using CDONTS does not work for you, I know of an ActiveX dll you can use to help sending e-mail.
I use this for a web e-mail system for our customers.

Visit:
http://www.chilkatsoft.com/WebMail.asp
http://www.chilkatsoft.com/WebMail.asp#Examples
http://www.chilkatsoft.com/webMailSimpleSend.asp

They provide lots of examples on how to use their components and they have great support too!
0
 
MRXLAuthor Commented:
Thanks MoOTottle, That helped i tried searching technet but couldn't find anything. I awarded you the points as I did already know how to do the cdonts. As I long as I got it working I suppose. Thanks everyone.
0
 
MoOTottleCommented:
Glad it helped :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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