Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

how can I write an ASP program to send email?

Posted on 1999-07-07
7
Medium Priority
?
174 Views
Last Modified: 2013-12-25
how can I write an ASP program to send email with the MS SMTP service?

There are some sample like this :

 dim oMsg

    Set oMsg = server.createobject("CDONTS.NewMail")
       oMsg.To = mailto:to@address.com
       oMsg.From = mailto:from@address.com
       oMsg.Subject = "this is the subject line"
       oMsg.Body = "sail away..."

       oMsg.Send

Can you tell me more about this object?
Such as how to attach file to email, how to control the encoding of attachment?


   set oMsg = nothing
0
Comment
Question by:cstsang
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 10

Accepted Solution

by:
MasseyM earned 760 total points
ID: 1834923
Check out these articles:

http://msdn.microsoft.com/library/sdkdoc/cdo/amsmtp_0qzj.htm
http://msdn.microsoft.com/library/sdkdoc/cdo/amsmtp_3kdv.htm

When you go to these articles, be sure to click the "Sync TOC" image at the top left.
0
 
LVL 7

Author Comment

by:cstsang
ID: 1834924
The content is very useful for me.
However, how can I send Chinese/Double Byte Character Set  email?
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1834925
0
Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

 
LVL 7

Author Comment

by:cstsang
ID: 1834926
I have tried it.
Also, I have installed the code on the NT server.
But it still doesn't work.

0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1834927
Does you have Exchange installed on the server?  You must have that installed to use the CDONTS system...

If not, I reocmmned you use JMail from www.dimac.net.  It is free and VERY good.
0
 
LVL 7

Author Comment

by:cstsang
ID: 1834928
First, I should thank you for your suggestion. However, if the mail subject is chinese, then MS outlook client can't read the chinese subject.

By the way, I have another problem on it. I have installed IIS 4.0 on other  server. However, the SMTP server cannot send email using the previous .asp program, but it can received email from outside.

The original server is PDC. And the new server is just a stand alone server.  I think this is the only difference between them.
So, do you know what happening?

0
 

Expert Comment

by:bitsnake
ID: 2158528
i think cdonts only need smtp,isn't it?
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

704 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